Commit 7d0951b7 authored by Gérard Huet's avatar Gérard Huet

Morpho_ext becomes Morpho_scl

parent 36d69f4e
......@@ -6,7 +6,7 @@
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% This file has been automatically generated with the command
%% ocamlweb --noweb --tex ../DOC/docintro.tex control.ml version.ml date.ml canon.ml transduction.ml encode.ml order.ml padapatha.ml sanskrit.mli sanskrit.ml skt_lexer.ml test_stamp.ml paths.ml index.ml phonetics.ml int_sandhi.ml skt_morph.mli morphology.mli naming.ml inflected.mli inflected.ml sandhi.ml sandhier.ml pada.ml nouns.mli nouns.ml verbs.mli verbs.ml parts.ml conj_infos.mli morpho_string.ml morpho.ml declension.ml conjugation.ml indexer.ml indexerd.ml phases.ml lemmatizer.ml auto.mli load_transducers.ml dispatcher.mli dispatcher.ml segmenter.ml load_morphs.ml lexer.mli lexer.ml rank.ml uoh_interface.ml reader.ml parser.ml constraints.mli constraints.ml multilingual.ml paraphrase.mli paraphrase.ml reader_plugin.ml bank_lexer.ml regression.ml checkpoints.ml graph_segmenter.ml automaton.ml interface.mli interface.ml user_aid.ml reset_caches.ml html.ml web.ml css.ml cgi.ml morpho_html.ml chapters.ml mk_index_page.ml mk_grammar_page.ml mk_reader_page.ml mk_sandhi_page.ml morpho_ext.ml -o ../DOC/Heritage_Platform.tex
%% ocamlweb --noweb --tex ../DOC/docintro.tex control.ml version.ml date.ml canon.ml transduction.ml encode.ml order.ml padapatha.ml sanskrit.mli sanskrit.ml skt_lexer.ml test_stamp.ml paths.ml index.ml phonetics.ml int_sandhi.ml skt_morph.mli morphology.mli naming.ml inflected.mli inflected.ml sandhi.ml sandhier.ml pada.ml nouns.mli nouns.ml verbs.mli verbs.ml parts.ml conj_infos.mli morpho_string.ml morpho.ml declension.ml conjugation.ml indexer.ml indexerd.ml phases.ml lemmatizer.ml auto.mli load_transducers.ml dispatcher.mli dispatcher.ml segmenter.ml load_morphs.ml lexer.mli lexer.ml rank.ml scl_parser.ml reader.ml parser.ml constraints.mli constraints.ml multilingual.ml paraphrase.mli paraphrase.ml bank_lexer.ml regression.ml checkpoints.ml graph_segmenter.ml automaton.ml interface.mli interface.ml user_aid.ml reset_caches.ml html.ml web.ml css.ml cgi.ml morpho_html.ml chapters.ml mk_index_page.ml mk_grammar_page.ml mk_reader_page.ml mk_sandhi_page.ml morpho_ext.ml -o ../DOC/Heritage_Platform.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% WARNING Do not edit manually docintro.tex, mechanically produced by configure from docintro
......@@ -14,7 +14,7 @@
\vspace*{24pt}
{\Large The Sanskrit Platform Documentation}\\[10pt]
{\Large (Sanskrit Library V2.99; Zen toolkit V3.1)}\\[15pt]
{\large 2017-06-01}\\[15pt]
{\large 2017-06-02}\\[15pt]
{\large G\'erard Huet \& Pawan Goyal}\\[10pt]
{\large Copyright \copyright ~2000-2017 Inria}\\[20pt]
\end{center}
......@@ -99,7 +99,7 @@ Generated by make version - see main Makefile
\label{version.ml:671}%
\medskip
\ocwbegincode{}\ocwindent{0.00em}
$\ocwlowerid{value}~\ocwlowerid{version}=$\ocwstring{"2.99"}~\ocwkw{and}~$\ocwlowerid{version\_date}=$\ocwstring{"2017\symbol{45}06\symbol{45}01"};\ocweol
$\ocwlowerid{value}~\ocwlowerid{version}=$\ocwstring{"2.99"}~\ocwkw{and}~$\ocwlowerid{version\_date}=$\ocwstring{"2017\symbol{45}06\symbol{45}02"};\ocweol
\ocweol
\ocwendcode{}\typeout{OcamlWeb file Date.ml}
\ocwmodule{Date}
......@@ -41727,7 +41727,7 @@ $\ocwlowerid{value}~\ocwlowerid{un\_analyzable}~:~\ocwupperid{Word.}\ocwlowerid{
\ocwindent{1.00em}
$\ocwlowerid{value}~\ocwlowerid{set\_offset}~:~($\ocwbt{int}~$\times{}~$\ocwbt{list}~$\ocwupperid{Viccheda.}\ocwlowerid{check})~\rightarrow{}~$\ocwbt{unit};\ocweol
\ocwindent{1.00em}
$\ocwlowerid{value}~\ocwlowerid{print\_ext\_segment}~:~$\ocwbt{int}~$\rightarrow{}~\ocwupperid{Disp.}\ocwlowerid{segment}~\rightarrow{}~$\ocwbt{int};\ocweol
$\ocwlowerid{value}~\ocwlowerid{print\_scl\_segment}~:~$\ocwbt{int}~$\rightarrow{}~(\ocwupperid{Phases.}\ocwlowerid{phase}~\times{}~\ocwupperid{Word.}\ocwlowerid{word})~\rightarrow{}~$\ocwbt{int};\ocweol
\ocwindent{1.00em}
$\ocwlowerid{value}~\ocwlowerid{record\_tagging}~:~$\ocwbt{bool}~$\rightarrow{}~$\ocwbt{bool}~$\rightarrow{}~$\ocwbt{string}~$\rightarrow{}~$\ocwbt{int}~$\rightarrow{}~$\ocwbt{string}~$\rightarrow{}~$\ocweol
\ocwindent{2.00em}
......@@ -41796,9 +41796,9 @@ $\ocwlowerid{value}~\ocwlowerid{out\_chan}~:~$\ocwbt{ref}~$\ocwlowerid{out\_chan
\ocwindent{0.00em}
\ocwkw{open}~$\ocwupperid{Phases};~$\ocwbc{} Phases \ocwec{}~\ocweol
\ocwindent{0.00em}
\ocwkw{open}~$\ocwupperid{Phases};~$\ocwbc{} \ocwbegindcode{}$\ocwlowerid{phase}$\ocwenddcode{} \ocwec{}\medskip
\ocwkw{open}~$\ocwupperid{Phases};~$\ocwbc{} phase \ocwec{}\medskip
\label{lexer.ml:1776}%
\label{lexer.ml:1774}%
\ocwindent{0.00em}
\ocwkw{module}~$\ocwupperid{Lemmas}~=~\ocwupperid{Load\_morphs.Morphs}~\ocwupperid{Prel}~\ocwupperid{Phases}$\ocweol
\ocwindent{0.00em}
......@@ -41810,11 +41810,11 @@ $\ocwlowerid{value}~\ocwlowerid{out\_chan}~:~$\ocwbt{ref}~$\ocwlowerid{out\_chan
\ocwindent{0.00em}
\ocwkw{open}~$\ocwupperid{Load\_transducers};~$\ocwbc{} \ocwbegindcode{}$\ocwlowerid{transducer\_vect}~\ocwupperid{Trans}$\ocwenddcode{} \ocwec{}\medskip
\label{lexer.ml:1916}%
\label{lexer.ml:1914}%
\ocwindent{0.00em}
\ocwkw{module}~$\ocwupperid{Transducers}~=~\ocwupperid{Trans}~\ocwupperid{Prel};$\medskip
\label{lexer.ml:1950}%
\label{lexer.ml:1948}%
\ocwindent{0.00em}
\ocwkw{module}~$\ocwupperid{Disp}~=~\ocwupperid{Dispatch}~\ocwupperid{Transducers}~\ocwupperid{Lemmas};$\ocweol
\ocwindent{0.00em}
......@@ -41981,7 +41981,7 @@ $]$\ocweol
\ocwindent{0.00em}
;\ocweol
\ocwindent{0.00em}
$\ocwlowerid{value}~\ocwlowerid{print\_ext\_morph}~\ocwlowerid{pvs}~\ocwlowerid{gen}~\ocwlowerid{form}~\ocwlowerid{tag}~=~$\ocwkw{do}\ocweol
$\ocwlowerid{value}~\ocwlowerid{print\_scl\_morph}~\ocwlowerid{pvs}~\ocwlowerid{gen}~\ocwlowerid{form}~\ocwlowerid{tag}~=~$\ocwkw{do}\ocweol
\ocwindent{1.00em}
\{~$\ocwlowerid{ps}~(\ocwlowerid{xml\_begin}~$\ocwstring{"tag"}$)$\ocweol
\ocwindent{1.00em}
......@@ -41993,7 +41993,7 @@ $\ocwlowerid{value}~\ocwlowerid{print\_ext\_morph}~\ocwlowerid{pvs}~\ocwlowerid{
\ocwindent{0.00em}
;\ocweol
\ocwindent{0.00em}
$\ocwlowerid{value}~\ocwlowerid{print\_ext\_tags}~\ocwlowerid{pvs}~\ocwlowerid{phase}~\ocwlowerid{form}~\ocwlowerid{tags}~=~$\ocweol
$\ocwlowerid{value}~\ocwlowerid{print\_scl\_tags}~\ocwlowerid{pvs}~\ocwlowerid{phase}~\ocwlowerid{form}~\ocwlowerid{tags}~=~$\ocweol
\ocwindent{1.00em}
\ocwkw{let}~$\ocwlowerid{table\_ext}~\ocwlowerid{phase}~=~$\ocweol
\ocwindent{3.00em}
......@@ -42001,7 +42001,7 @@ $\ocwlowerid{xml\_begin\_with\_att}~$\ocwstring{"tags"}~$[~($\ocwstring{"phase"}
\ocwindent{1.00em}
\{~$\ocwlowerid{ps}~(\ocwlowerid{table\_ext}~\ocwlowerid{phase})~$\ocweol
\ocwindent{1.00em}
;~$\ocwupperid{List.}\ocwlowerid{iter}~(\ocwlowerid{print\_ext\_morph}~\ocwlowerid{pvs}~(\ocwlowerid{generative}~\ocwlowerid{phase})~\ocwlowerid{form})~\ocwlowerid{tags}~$\ocweol
;~$\ocwupperid{List.}\ocwlowerid{iter}~(\ocwlowerid{print\_scl\_morph}~\ocwlowerid{pvs}~(\ocwlowerid{generative}~\ocwlowerid{phase})~\ocwlowerid{form})~\ocwlowerid{tags}~$\ocweol
\ocwindent{1.00em}
;~$\ocwlowerid{ps}~(\ocwlowerid{xml\_end}~$\ocwstring{"tags"}$)$\ocweol
\ocwindent{1.00em}
......@@ -42009,7 +42009,7 @@ $\ocwlowerid{xml\_begin\_with\_att}~$\ocwstring{"tags"}~$[~($\ocwstring{"phase"}
\ocwindent{0.00em}
;\ocweol
\ocwindent{0.00em}
\ocwbc{} used in Parser \ocwec{}\ocweol
\ocwbc{} Used in Parser \ocwec{}\ocweol
\ocwindent{0.00em}
$\ocwlowerid{value}~\ocwlowerid{extract\_lemma}~\ocwlowerid{phase}~\ocwlowerid{word}~=~$\ocweol
\ocwindent{0.50em}
......@@ -42029,7 +42029,7 @@ $]$\ocweol
\ocwindent{0.00em}
;~\ocweol
\ocwindent{0.00em}
\ocwbc{} returns the offset correction (used by SL interface) \ocwec{}\ocweol
\ocwbc{} Returns the offset correction (used by SL interface) \ocwec{}\ocweol
\ocwindent{0.00em}
$\ocwlowerid{value}~\ocwlowerid{process\_transition}~=~$\ocwkw{fun}~\ocweol
\ocwindent{1.00em}
......@@ -42201,9 +42201,9 @@ $\ocwlowerid{value}~\ocwlowerid{print\_segment}~\ocwlowerid{offset}~(\ocwlowerid
\ocwindent{0.00em}
;\ocweol
\ocwindent{0.00em}
\ocwbc{} Similarly for \ocwbegindcode{}$\ocwupperid{Reader\_plugin}$\ocwenddcode{} mode (without offset) \ocwec{}\ocweol
\ocwbc{} Similarly for \ocwbegindcode{}$\ocwupperid{Reader\_plugin}$\ocwenddcode{} mode (without offset and transitions) \ocwec{}\ocweol
\ocwindent{0.00em}
$\ocwlowerid{value}~\ocwlowerid{print\_ext\_segment}~\ocwlowerid{counter}~(\ocwlowerid{phase},\ocwlowerid{rword},\ocwlowerid{\_})~=~$\ocweol
$\ocwlowerid{value}~\ocwlowerid{print\_scl\_segment}~\ocwlowerid{counter}~(\ocwlowerid{phase},\ocwlowerid{rword})~=~$\ocweol
\ocwindent{1.00em}
\ocwkw{let}~$\ocwlowerid{print\_pada}~\ocwlowerid{rword}~=~$\ocweol
\ocwindent{2.00em}
......@@ -42227,7 +42227,7 @@ $\ocwlowerid{pl}~(\ocwlowerid{td\_begin\_class}~\ocwlowerid{solid})$\ocweol
\ocwindent{3.50em}
$[~\ocwupperid{Atomic}~\ocwlowerid{tags}~\rightarrow{}~$\ocweol
\ocwindent{5.00em}
$\ocwlowerid{print\_ext\_tags}~[\,]~\ocwlowerid{phase}~\ocwlowerid{word}~\ocwlowerid{tags}~$\ocweol
$\ocwlowerid{print\_scl\_tags}~[\,]~\ocwlowerid{phase}~\ocwlowerid{word}~\ocwlowerid{tags}~$\ocweol
\ocwindent{3.50em}
$\mid{}~\ocwupperid{Preverbed}~(\ocwlowerid{\_},\ocwlowerid{phase})~\ocwlowerid{pvs}~\ocwlowerid{form}~\ocwlowerid{tags}~\rightarrow{}$\ocweol
\ocwindent{4.50em}
......@@ -42237,7 +42237,7 @@ $\mid{}~\ocwupperid{Preverbed}~(\ocwlowerid{\_},\ocwlowerid{phase})~\ocwlowerid{
\ocwindent{5.50em}
\ocwkw{else}~$\ocwlowerid{trim\_tags}~(\ocwlowerid{generative}~\ocwlowerid{phase})~\ocwlowerid{form}~(\ocwupperid{Canon.}\ocwlowerid{decode}~\ocwlowerid{pvs})~\ocwlowerid{tags}~$\ocwkw{in}~\ocweol
\ocwindent{5.00em}
$\ocwlowerid{print\_ext\_tags}~\ocwlowerid{pvs}~\ocwlowerid{phase}~\ocwlowerid{form}~\ocwlowerid{ok\_tags}$\ocweol
$\ocwlowerid{print\_scl\_tags}~\ocwlowerid{pvs}~\ocwlowerid{phase}~\ocwlowerid{form}~\ocwlowerid{ok\_tags}$\ocweol
\ocwindent{3.50em}
$\mid{}~\ocwupperid{Taddhita}~\ocwlowerid{\_}~\ocwlowerid{\_}~\ocwlowerid{sfx\_phase}~\ocwlowerid{sfx\_tags}~\rightarrow{}~$\ocweol
\ocwindent{5.00em}
......@@ -42251,11 +42251,11 @@ $\mid{}~\ocwlowerid{\_}~\rightarrow{}~\ocwlowerid{failwith}~$\ocwstring{"Wrong\o
\ocwindent{7.00em}
$]~$\ocwkw{in}\ocweol
\ocwindent{5.00em}
$\ocwlowerid{print\_ext\_tags}~[\,]~\ocwlowerid{taddhita\_phase}~\ocwlowerid{word}~\ocwlowerid{sfx\_tags}$\ocweol
$\ocwlowerid{print\_scl\_tags}~[\,]~\ocwlowerid{taddhita\_phase}~\ocwlowerid{word}~\ocwlowerid{sfx\_tags}$\ocweol
\ocwindent{3.50em}
$]$\ocweol
\ocwindent{1.00em}
;~$\ocwlowerid{ps}~$\ocwstring{"'\ensuremath{>}"}\ocweol
;~$\ocwlowerid{ps}~$\ocwstring{"'\ensuremath{>}"}~\ocwbc{} closes <input \ocwec{}\ocweol
\ocwindent{1.00em}
;~\ocwkw{let}~$\ocwlowerid{word}~=~\ocwupperid{Morpho\_html.}\ocwlowerid{visargify}~\ocwlowerid{rword}~$\ocwkw{in}~\ocweol
\ocwindent{2.00em}
......@@ -42271,22 +42271,6 @@ $\ocwlowerid{ps}~(\ocwupperid{Canon.}\ocwlowerid{unidevcode}~\ocwlowerid{word})$
\ocwindent{0.00em}
;~\ocweol
\ocwindent{0.00em}
$\ocwlowerid{value}~\ocwlowerid{cell}~\ocwlowerid{item}~=~$\ocwkw{do}~\ocwbc{} residual of Html \ocwec{}\ocweol
\ocwindent{1.00em}
\{~$\ocwlowerid{ps}~\ocwlowerid{tr\_begin}~$\ocweol
\ocwindent{1.00em}
;~$\ocwlowerid{ps}~\ocwlowerid{th\_begin}~$\ocweol
\ocwindent{1.00em}
;~$\ocwlowerid{ps}~\ocwlowerid{item}$\ocweol
\ocwindent{1.00em}
;~$\ocwlowerid{ps}~\ocwlowerid{th\_end}~$\ocweol
\ocwindent{1.00em}
;~$\ocwlowerid{pl}~\ocwlowerid{tr\_end}~$\ocweol
\ocwindent{1.00em}
\}\ocweol
\ocwindent{0.00em}
;\ocweol
\ocwindent{0.00em}
$\ocwlowerid{value}~\ocwlowerid{print\_labels}~\ocwlowerid{tags}~\ocwlowerid{seg\_num}~=~$\ocwkw{do}\ocweol
\ocwindent{2.00em}
\{~$\ocwlowerid{ps}~\ocwlowerid{th\_begin}~$\ocwbc{} begin labels \ocwec{}~\ocweol
......@@ -42295,7 +42279,7 @@ $\ocwlowerid{value}~\ocwlowerid{print\_labels}~\ocwlowerid{tags}~\ocwlowerid{seg
\ocwindent{2.00em}
;~\ocwkw{let}~$\ocwlowerid{print\_label}~\ocwlowerid{n}~\ocwlowerid{\_}~=~$\ocwkw{do}\ocweol
\ocwindent{4.00em}
\{~$\ocwlowerid{cell}~(\ocwlowerid{html\_red}~(\ocwlowerid{string\_of\_int}~\ocwlowerid{seg\_num}~$\^{}~\ocwstring{"."}~\^{}~$\ocwlowerid{string\_of\_int}~\ocwlowerid{n}))$\ocweol
\{~$\ocwlowerid{ps}~(\ocwlowerid{cell}~(\ocwlowerid{html\_red}~(\ocwlowerid{string\_of\_int}~\ocwlowerid{seg\_num}~$\^{}~\ocwstring{"."}~\^{}~$\ocwlowerid{string\_of\_int}~\ocwlowerid{n})))$\ocweol
\ocwindent{4.00em}
;~$\ocwlowerid{n}+1$\ocweol
\ocwindent{4.00em}
......@@ -42497,7 +42481,7 @@ $]$\ocweol
\ocwindent{0.00em}
;\medskip
\label{lexer.ml:13732}%
\label{lexer.ml:13644}%
\ocwindent{0.00em}
\ocwkw{module}~$\ocwupperid{Report\_chan}~=~$\ocwkw{struct}~\ocweol
\ocwindent{0.00em}
......@@ -42505,14 +42489,14 @@ $\ocwlowerid{value}~\ocwlowerid{chan}~=~\ocwupperid{Control.}\ocwlowerid{out\_ch
\ocwindent{0.00em}
\ocwkw{end};\medskip
\label{lexer.ml:13820}%
\label{lexer.ml:13732}%
\ocwindent{0.00em}
\ocwkw{module}~$\ocwupperid{Morpho\_out}~=~\ocwupperid{Morpho.Morpho\_out}~\ocwupperid{Report\_chan};$\medskip
\ocwendcode{}\ocwindent{0.00em}
Recording of selected solution - used only in Regression
\ocweol
\label{lexer.ml:13935}%
\label{lexer.ml:13847}%
\medskip
\ocwbegincode{}\ocwindent{0.00em}
$\ocwlowerid{value}~\ocwlowerid{record\_tagging}~\ocwlowerid{unsandhied}~\ocwlowerid{mode\_sent}~\ocwlowerid{mode\_trans}~\ocwlowerid{all}~\ocwlowerid{sentence}~\ocwlowerid{output}~\ocwlowerid{proj}~=~$\ocweol
......@@ -42757,7 +42741,7 @@ $\ocwlowerid{return\_morph}~(\ocwupperid{List.}\ocwlowerid{rev}~(\ocwlowerid{tag
\ocwindent{0.00em}
;\medskip
\label{lexer.ml:18639}%
\label{lexer.ml:18551}%
\ocwindent{0.00em}
\ocwkw{end};\ocweol
\ocwendcode{}\typeout{OcamlWeb file Rank.ml}
......@@ -43071,17 +43055,17 @@ $\ocwlowerid{segment\_chunks\_filter}~\ocwlowerid{filter\_mode}~\ocwlowerid{chun
\ocwindent{0.00em}
;\ocweol
\ocweol
\ocwendcode{}\typeout{OcamlWeb file Uoh_interface.ml}
\ocwmodule{Uoh\_interface}
\label{uoh_interface.ml:0}%
\ocwendcode{}\typeout{OcamlWeb file Scl_parser.ml}
\ocwmodule{Scl\_parser}
\label{scl_parser.ml:0}%
Interface with UoH dependency parser
\ocweol
\label{uoh_interface.ml:663}%
\label{scl_parser.ml:663}%
\medskip
\ocwbegincode{}\ocwindent{0.00em}
\ocwkw{open}~$\ocwupperid{Html};~$\ocweol
\ocwindent{0.00em}
\ocwkw{open}~$\ocwupperid{Web};~$\ocwbc{} ps pl etc. \ocwbegindcode{}$\ocwlowerid{scl\_url}$\ocwenddcode{} \ocwec{}\ocweol
\ocwkw{open}~$\ocwupperid{Web};~$\ocwbc{} ps pl etc. \ocwec{}\ocweol
\ocwindent{0.00em}
\ocwkw{open}~$\ocwupperid{Morphology};~$\ocwbc{} inflected lemma morphology \ocwec{}\ocweol
\ocwindent{0.00em}
......@@ -43091,119 +43075,63 @@ Interface with UoH dependency parser
\ocwindent{0.00em}
\ocwkw{open}~$\ocwupperid{SCLpaths};~$\ocwbc{} \ocwbegindcode{}$\ocwlowerid{scl\_url}~\ocwlowerid{scl\_cgi}$\ocwenddcode{} \ocwec{}\medskip
\label{uoh_interface.ml:861}%
\ocwindent{0.00em}
$\ocwlowerid{value}~\ocwlowerid{svg\_interface\_url}~=~\ocwlowerid{scl\_cgi}~$\^{}~\ocwstring{"SHMT/"}~\ocweol
\ocwindent{0.00em}
\ocwkw{and}~$\ocwlowerid{nn\_parser\_url}~=~\ocwlowerid{scl\_cgi}~$\^{}~\ocwstring{"NN/parser/generate.cgi"}\ocweol
\ocwindent{0.00em}
\ocwkw{and}~$\ocwlowerid{show\_parses\_path}~=~$\ocwstring{"prog/interface/call\_parser\_summary.cgi"}\ocweol
\ocwindent{0.00em}
;\medskip
\label{uoh_interface.ml:1028}%
\label{scl_parser.ml:852}%
\ocwindent{0.00em}
\ocwkw{module}~$\ocwupperid{Prel}~=~$\ocwkw{struct}~\ocwbc{} similar to Interface's lexer prelude \ocwec{}\medskip
\label{uoh_interface.ml:1093}%
\ocwkw{module}~$\ocwupperid{Prel}~=~$\ocwkw{struct}~\ocweol
\ocwindent{0.50em}
$\ocwlowerid{value}~\ocwlowerid{prelude}~()~=~$\ocwkw{do}\ocweol
\ocwindent{1.00em}
\{~$\ocwlowerid{pl}~\ocwlowerid{http\_header}$\ocweol
\ocwindent{1.00em}
;~$\ocwlowerid{page\_begin}~\ocwlowerid{graph\_meta\_title}~$\ocweol
\ocwindent{1.00em}
;~$\ocwlowerid{pl}~(\ocwlowerid{body\_begin}~\ocwupperid{Chamois\_back})$\ocweol
\ocwindent{1.00em}
;~$\ocwlowerid{open\_page\_with\_margin}~15$\ocweol
\ocwindent{1.00em}
\}\ocweol
\ocwindent{0.00em}
;\ocweol
$\ocwlowerid{value}~\ocwlowerid{prelude}~()~=~\ocwupperid{Web.}\ocwlowerid{reader\_prelude}~\ocwupperid{Web.}\ocwlowerid{reader\_title};$\ocweol
\ocwindent{0.50em}
\ocwkw{end}~\ocwbc{} Prel \ocwec{}\ocweol
\ocwindent{0.00em}
;\ocweol
\ocwindent{0.00em}
\ocwbc{} Service routines for morphological query, loading the morphology banks \ocwec{}\ocweol
\ocwbc{} Global parameters of the lexer \ocwec{}\ocweol
\ocwindent{0.00em}
$\ocwlowerid{value}~\ocwlowerid{iterate}~=~$\ocwbt{ref}~$\ocwupperid{True}~$\ocwbc{} by default a chunk is a list of words \ocwec{}\ocweol
\ocwindent{0.00em}
\ocwkw{module}~$\ocwupperid{Lemmas}~=~\ocwupperid{Load\_morphs.Morphs}~\ocwupperid{Prel}~\ocwupperid{Phases}~$\ocweol
\ocwkw{and}~$\ocwlowerid{complete}~=~$\ocwbt{ref}~$\ocwupperid{True}~$\ocwbc{} by default we call the fuller segmenter \ocwec{}\ocweol
\ocwindent{0.00em}
\ocwkw{and}~$\ocwlowerid{output\_channel}~=~$\ocwbt{ref}~$\ocwlowerid{stdout}~$\ocwbc{} by default cgi output on standard output \ocwec{}\ocweol
\ocwindent{0.00em}
;\ocweol
\ocwindent{0.00em}
\ocwkw{open}~$\ocwupperid{Lemmas}~$\ocwbc{} \ocwbegindcode{}$\ocwlowerid{tags\_of}~\ocwlowerid{morpho}$\ocwenddcode{} \ocwec{}\ocweol
\ocwkw{module}~$\ocwupperid{Lexer\_control}~=~$\ocwkw{struct}\ocweol
\ocwindent{0.50em}
$\ocwlowerid{value}~\ocwlowerid{star}~=~\ocwlowerid{iterate};$\ocweol
\ocwindent{0.50em}
$\ocwlowerid{value}~\ocwlowerid{full}~=~\ocwlowerid{complete};$\ocweol
\ocwindent{0.50em}
$\ocwlowerid{value}~\ocwlowerid{out\_chan}~=~\ocwlowerid{output\_channel}$\ocweol
\ocwindent{0.00em}
;~\ocweol
\ocwindent{0.00em}
\ocwkw{end}~\ocwbc{} \ocwbegindcode{}$\ocwupperid{Lexer\_control}$\ocwenddcode{} \ocwec{}\ocweol
\ocwindent{0.00em}
;\ocweol
\ocwindent{0.00em}
\ocwkw{open}~$\ocwupperid{Phases};~$\ocwbc{} phase etc. \ocwec{}\medskip
\label{uoh_interface.ml:1449}%
\ocwbc{} Multi-phase lexer \ocwec{}\ocweol
\ocwindent{0.00em}
\ocwkw{module}~$\ocwupperid{UOH}~$\ocweol
\ocwindent{1.00em}
$(\ocwupperid{Lex}:~$\ocwkw{sig}~\ocweol
\ocwindent{1.00em}
\ocwkw{module}~$\ocwupperid{Disp}~:$\ocweol
\ocwindent{3.00em}
\ocwkw{sig}\ocweol
\ocwindent{3.00em}
\ocwkw{type}~$\ocwlowerid{transition};$\ocweol
\ocwindent{3.00em}
$\ocwlowerid{value}~\ocwlowerid{color\_of\_phase}:~\ocwlowerid{phase}~\rightarrow{}~\ocwlowerid{color};~$\ocweol
\ocwindent{3.00em}
\ocwkw{type}~$\ocwlowerid{segment}~=~(\ocwlowerid{phase}~\times{}~\ocwupperid{Word.}\ocwlowerid{word}~\times{}~\ocwlowerid{transition});$\ocweol
\ocwindent{3.00em}
\ocwkw{end};~\ocweol
\ocwindent{1.00em}
$\ocwlowerid{value}~\ocwlowerid{print\_ext\_segment}:~$\ocwbt{int}~$\rightarrow{}~\ocwupperid{Disp.}\ocwlowerid{segment}~\rightarrow{}~$\ocwbt{int};~\ocweol
\ocwindent{1.00em}
\ocwkw{end}$)~=~$\ocwkw{struct}\medskip
\ocwendcode{}\ocwindent{0.00em}
Interface with Amba Kulkarni's parser at UoH - Analysis mode
\ocweol
\label{uoh_interface.ml:1910}%
\medskip
\ocwbegincode{}\ocwindent{0.00em}
$\ocwlowerid{value}~\ocwlowerid{print\_ext\_output}~(\ocwlowerid{\_},\ocwlowerid{output})~=~$\ocweol
\ocwindent{1.00em}
$\ocwupperid{List.}\ocwlowerid{fold\_left}~\ocwupperid{Lex.}\ocwlowerid{print\_ext\_segment}~1~(\ocwupperid{List.}\ocwlowerid{rev}~\ocwlowerid{output})~$\ocweol
\ocwkw{module}~$\ocwupperid{Lex}~=~\ocwupperid{Lexer.Lexer}~\ocwupperid{Prel}~\ocwupperid{Lexer\_control}~$\ocwbc{} \ocwbegindcode{}$\ocwlowerid{print\_scl\_segment}$\ocwenddcode{} \ocwec{}\ocweol
\ocwindent{0.00em}
;\medskip
\ocwendcode{}\ocwindent{0.00em}
Delimitor for offline printing and piping into UoH's parser
\ocweol
\label{uoh_interface.ml:2076}%
\medskip
\ocwbegincode{}\ocwindent{0.00em}
$\ocwlowerid{value}~\ocwlowerid{delimitor}~=~$\ocwkw{fun}\ocweol
\ocwindent{1.00em}
$[~\ocwupperid{Iic}~\mid{}~\ocwupperid{Iic2}~\mid{}~\ocwupperid{A}~\mid{}~\ocwupperid{An}~\mid{}~\ocwupperid{Iicv}~\mid{}~\ocwupperid{Iicc}~\mid{}~\ocwupperid{Iik}~\mid{}~\ocwupperid{Iikv}~\mid{}~\ocwupperid{Iikc}~\mid{}~\ocwupperid{Iiif}~\mid{}~\ocwupperid{Iiy}~\rightarrow{}~$\ocwstring{"\symbol{45}"}\ocweol
\ocwindent{1.00em}
$\mid{}~\ocwupperid{Iiv}~\mid{}~\ocwupperid{Iivv}~\mid{}~\ocwupperid{Iivc}~\rightarrow{}~$\ocwstring{"++"}\ocweol
\ocwindent{1.00em}
$\mid{}~\ocwupperid{Pv}~\mid{}~\ocwupperid{Pvk}~\mid{}~\ocwupperid{Pvkc}~\mid{}~\ocwupperid{Pvkv}~\rightarrow{}~\ocwlowerid{failwith}~$\ocwstring{"No\ocwvspace{}more\ocwvspace{}Pv\ocwvspace{}segments"}~\ocweol
\ocwindent{1.00em}
$\mid{}~\ocwlowerid{\_}~\rightarrow{}~$\ocwstring{"\ocwvspace{}"}\ocweol
;\ocweol
\ocwindent{0.00em}
$\ocwlowerid{value}~\ocwlowerid{print\_scl\_output}~\ocwlowerid{output}~=~$\ocweol
\ocwindent{1.00em}
$]$\ocweol
$\ocwupperid{List.}\ocwlowerid{fold\_left}~\ocwupperid{Lex.}\ocwlowerid{print\_scl\_segment}~1~(\ocwupperid{List.}\ocwlowerid{rev}~\ocwlowerid{output})~$\ocweol
\ocwindent{0.00em}
;\ocweol
\ocwindent{0.00em}
$\ocwlowerid{value}~\ocwlowerid{print\_ext\_solutions}~\ocwlowerid{s}~=$\ocweol
$\ocwlowerid{value}~\ocwlowerid{print\_scl\_solutions}~\ocwlowerid{s}~=$\ocweol
\ocwindent{1.50em}
\ocwkw{let}~$\ocwlowerid{\_}~=~\ocwlowerid{print\_ext\_output}~\ocwlowerid{s}~$\ocwkw{in}~$()$\ocweol
\ocwkw{let}~$\ocwlowerid{\_}~=~\ocwlowerid{print\_scl\_output}~\ocwlowerid{s}~$\ocwkw{in}~$()$\ocweol
\ocwindent{0.00em}
;\medskip
\ocwendcode{}\ocwindent{0.00em}
Invocation of UoH's CSL parser for dependency graph display
\ocweol
\label{uoh_interface.ml:2422}%
\medskip
\ocwbegincode{}\ocwindent{0.00em}
$\ocwlowerid{value}~\ocwlowerid{print\_ext1}~(\ocwlowerid{solutions}~:~($\ocwbt{int}~$\times{}~$\ocwbt{list}~$\ocwupperid{Lex.Disp.}\ocwlowerid{segment}))~=~$\ocwkw{do}\ocweol
;\ocweol
\ocwindent{0.00em}
\ocwbc{} Invocation of UoH's CSL parser for dependency graph display \ocwec{}\ocweol
\ocwindent{0.00em}
$\ocwlowerid{value}~\ocwlowerid{print\_scl1}~(\ocwlowerid{solutions}~:~$\ocwbt{list}~$(\ocwupperid{Phases.}\ocwlowerid{phase}~\times{}~\ocwupperid{Word.}\ocwlowerid{word}))~=$\ocweol
\ocwindent{1.00em}
\ocwkw{let}~$\ocwlowerid{svg\_interface\_url}~=~\ocwlowerid{scl\_cgi}~$\^{}~\ocwstring{"SHMT/"}~\ocwkw{in}~\ocwkw{do}\ocweol
\ocwindent{1.00em}
\{~$\ocwlowerid{ps}~($\ocwstring{"\ensuremath{<}script\ocwvspace{}type=\symbol{92}"text/javascript\symbol{92}"\ocwvspace{}src=\symbol{92}""}~\^{}~$\ocwlowerid{scl\_url}~$\^{}~\ocwstring{"js\_files/dragtable.js\symbol{92}"\ensuremath{>}\ensuremath{<}/script\ensuremath{>}"}$)$\ocweol
\ocwindent{1.00em}
......@@ -43215,7 +43143,9 @@ $\ocwlowerid{value}~\ocwlowerid{print\_ext1}~(\ocwlowerid{solutions}~:~($\ocwbt{
\ocwindent{1.00em}
;~$\ocwlowerid{ps}~\ocwlowerid{tr\_begin}$\ocweol
\ocwindent{1.00em}
;~$\ocwlowerid{print\_ext\_solutions}~\ocwlowerid{solutions}$\ocweol
;~$\ocwlowerid{print\_scl\_solutions}~\ocwlowerid{solutions}$\ocweol
\ocwindent{1.00em}
;~$\ocwlowerid{ps}~($\ocwstring{"\ensuremath{<}td\ensuremath{>}\ensuremath{<}input\ocwvspace{}type=\symbol{92}"hidden\symbol{92}"\ocwvspace{}name=\symbol{92}"DISPLAY\symbol{92}"\ocwvspace{}value=\symbol{92}""}~\^{}~$\ocwlowerid{default\_output\_font}~$\^{}\ocwstring{"\symbol{92}"/\ensuremath{>}\ensuremath{<}/td\ensuremath{>}"}$)$\ocweol
\ocwindent{1.00em}
;~$\ocwlowerid{ps}~\ocwlowerid{tr\_end}$\ocweol
\ocwindent{1.00em}
......@@ -43227,17 +43157,19 @@ $\ocwlowerid{value}~\ocwlowerid{print\_ext1}~(\ocwlowerid{solutions}~:~($\ocwbt{
\ocwindent{0.00em}
;\ocweol
\ocwindent{0.00em}
$\ocwlowerid{value}~\ocwlowerid{print\_ext}~\ocwlowerid{sols}~=~$\ocwkw{match}~$\ocwlowerid{sols}~$\ocwkw{with}\ocweol
\ocwbc{} We restrict to the first solution - TEMPORARY \ocwec{}\ocweol
\ocwindent{0.00em}
$\ocwlowerid{value}~\ocwlowerid{print\_scl}~\ocwlowerid{sols}~=~$\ocwkw{match}~$\ocwlowerid{sols}~$\ocwkw{with}~\ocweol
\ocwindent{1.00em}
$[~[\,]~\rightarrow{}~\ocwlowerid{failwith}~$\ocwstring{"No\ocwvspace{}sol"}\ocweol
\ocwindent{1.00em}
$\mid{}~[~\ocwlowerid{s}~::~\ocwlowerid{\_}~]~\rightarrow{}~\ocwlowerid{print\_ext1}~\ocwlowerid{s}$\ocweol
$\mid{}~[~\ocwlowerid{s}~::~\ocwlowerid{\_}~]~\rightarrow{}~\ocwlowerid{print\_scl1}~\ocwlowerid{s}$\ocweol
\ocwindent{1.00em}
$]$\ocweol
\ocwindent{0.00em}
;\ocweol
\ocwindent{0.00em}
\ocwkw{end};\ocweol
\ocwbc{} end; \ocwec{}\ocweol
\ocweol
\ocwendcode{}\typeout{OcamlWeb file Reader.ml}
\ocwmodule{Reader}
......@@ -43268,23 +43200,21 @@ This is mostly legacy code, being superseded by sharing Interface module
\ocwindent{0.00em}
\ocwkw{open}~$\ocwupperid{Phases};~$\ocwbc{} \ocwbegindcode{}$\ocwupperid{Phases}$\ocwenddcode{} \ocwec{}\ocweol
\ocwindent{0.00em}
\ocwkw{open}~$\ocwupperid{Rank};~$\ocwbc{} \ocwbegindcode{}$\ocwupperid{Prel}~\ocwupperid{Lex}~\ocwlowerid{segment\_all}~\ocwlowerid{iterate}$\ocwenddcode{} \ocwec{}~\ocweol
\ocwindent{0.00em}
\ocwkw{open}~$\ocwupperid{Uoh\_interface};~$\ocwbc{} Interface with UoH dependency parser \ocwec{}\medskip
\ocwkw{open}~$\ocwupperid{Rank};~$\ocwbc{} \ocwbegindcode{}$\ocwupperid{Prel}~\ocwupperid{Lex}~\ocwlowerid{segment\_all}~\ocwlowerid{iterate}$\ocwenddcode{} \ocwec{}\medskip
\label{reader.ml:1721}%
\ocwindent{0.00em}
\ocwkw{module}~$\ocwupperid{Ext}~=~\ocwupperid{UOH}~\ocwupperid{Lex}~$\ocwbc{} \ocwbegindcode{}$\ocwlowerid{print\_ext}~\ocwlowerid{print\_nn}$\ocwenddcode{} \ocwec{}\ocweol
\ocwindent{0.00em}
;\ocweol
\ocwindent{0.00em}
\ocwbc{} Reader interface \ocwec{}\ocweol
\ocwindent{0.00em}
\ocwbc{} Mode parameter of the reader. Controled by service Reader for respectively
tagging, shallow parsing, or dependency analysis with the UoH parser. \ocwec{}\ocweol
\ocwendcode{}\ocwindent{0.00em}
Reader interface
\ocweol
\ocwindent{0.00em}
\ocwbc{} Note that Summary/Interface is not a Reader/Parser mode. \ocwec{}\ocweol
Mode parameter of the reader. Controled by service Reader for respectively
tagging, shallow parsing, or dependency analysis with the UoH parser.
\ocweol
\ocwindent{0.00em}
Note that Summary/Interface is not a Reader/Parser mode.
\ocweol
\label{reader.ml:1898}%
\medskip
\ocwbegincode{}\ocwindent{0.00em}
\ocwkw{type}~$\ocwlowerid{mode}~=~[~\ocwupperid{Tag}~\mid{}~\ocwupperid{Parse}~\mid{}~\ocwupperid{Analyse}~]$\ocweol
\ocwindent{0.00em}
;\ocweol
......@@ -43323,7 +43253,7 @@ Prints n-th solution
\ocwindent{0.00em}
ind is relative index within kept, n is absolute index within max
\ocweol
\label{reader.ml:2684}%
\label{reader.ml:2570}%
\medskip
\ocwbegincode{}\ocwindent{0.00em}
$\ocwlowerid{value}~\ocwlowerid{print\_solution}~\ocwlowerid{text}~\ocwlowerid{ind}~(\ocwlowerid{n},\ocwlowerid{output})~=~$\ocwkw{do}\ocweol
......@@ -43353,7 +43283,7 @@ $\ocwlowerid{ind}+1$\ocweol
\ocwendcode{}\ocwindent{0.00em}
General display of solutions, in the various modes
\ocweol
\label{reader.ml:3186}%
\label{reader.ml:3072}%
\medskip
\ocwbegincode{}\ocwindent{0.00em}
$\ocwlowerid{value}~\ocwlowerid{print\_sols}~\ocwlowerid{text}~\ocwlowerid{revsols}~=~$\ocwbc{} stats = (kept,max) \ocwec{}\ocweol
......@@ -43364,7 +43294,7 @@ $\ocwlowerid{value}~\ocwlowerid{print\_sols}~\ocwlowerid{text}~\ocwlowerid{revso
\ocwindent{0.00em}
;\medskip
\label{reader.ml:3342}%
\label{reader.ml:3228}%
\ocwindent{0.00em}
$\ocwlowerid{value}~\ocwlowerid{display}~\ocwlowerid{limit}~\ocwlowerid{mode}~\ocwlowerid{text}~\ocwlowerid{saved}~=~$\ocwkw{fun}\ocweol
\ocwindent{1.00em}
......@@ -43462,17 +43392,23 @@ $]$\ocweol
\ocwindent{4.50em}
\}\ocweol
\ocwindent{3.00em}
$\mid{}~\ocwupperid{Analyse}~\rightarrow{}~$\ocwkw{match}~$\ocwlowerid{saved}~$\ocwkw{with}~\ocweol
\ocwindent{4.00em}
$[~[\,]~\rightarrow{}~\ocwupperid{Ext.}\ocwlowerid{print\_ext}~(\ocwlowerid{best\_sols}:$\ocwbt{list}~$($\ocwbt{int}~$\times{}~$\ocwbt{list}~$\ocwupperid{Rank.Lex.Disp.}\ocwlowerid{segment}))$\ocweol
\ocwindent{4.00em}
$\mid{}~[~(\ocwlowerid{\_},\ocwlowerid{min\_buck})~::~\ocwlowerid{\_}~]~\rightarrow{}~$\ocweol
\ocwindent{5.00em}
\ocwkw{let}~$\ocwlowerid{zero\_pen}~=~\ocwupperid{List.}\ocwlowerid{append}~\ocwlowerid{best\_sols}~(\ocwupperid{List.}\ocwlowerid{rev}~\ocwlowerid{min\_buck})~$\ocwkw{in}\ocweol
\ocwindent{5.00em}
$\ocwupperid{Ext.}\ocwlowerid{print\_ext}~\ocwlowerid{zero\_pen}$\ocweol
\ocwindent{4.00em}
$]$\ocweol
$\mid{}~\ocwupperid{Analyse}~\rightarrow{}~$\ocwbc{} \ocwbegindcode{}$\ocwlowerid{best\_sols}:~$\ocwbt{list}~$($\ocwbt{int}~$\times{}~$\ocwbt{list}~$\ocwupperid{Rank}.\ocwupperid{Lex}.\ocwupperid{Disp}.\ocwlowerid{segment})$\ocwenddcode{} \ocwec{}\ocweol
\ocwindent{4.50em}
\ocwkw{let}~$\ocwlowerid{solutions}~=~$\ocwkw{match}~$\ocwlowerid{saved}~$\ocwkw{with}~\ocweol
\ocwindent{6.50em}
$[~[\,]~\rightarrow{}~\ocwlowerid{best\_sols}$\ocweol
\ocwindent{6.50em}
$\mid{}~[~(\ocwlowerid{\_},\ocwlowerid{min\_buck})~::~\ocwlowerid{\_}~]~\rightarrow{}~\ocwupperid{List.}\ocwlowerid{append}~\ocwlowerid{best\_sols}~(\ocwupperid{List.}\ocwlowerid{rev}~\ocwlowerid{min\_buck})$\ocweol
\ocwindent{6.50em}
$]~$\ocwkw{in}\ocweol
\ocwindent{4.50em}
\ocwkw{let}~$\ocwlowerid{forget\_transitions}~(\ocwlowerid{phase},\ocwlowerid{word},\ocwlowerid{\_})~=~(\ocwlowerid{phase},\ocwlowerid{word})~$\ocwkw{in}\ocweol
\ocwindent{4.50em}
\ocwkw{let}~$\ocwlowerid{forget\_index}~(\ocwlowerid{\_},\ocwlowerid{segments})~=~\ocwupperid{List.}\ocwlowerid{map}~\ocwlowerid{forget\_transitions}~\ocwlowerid{segments}~$\ocwkw{in}\ocweol
\ocwindent{4.50em}
\ocwkw{let}~$\ocwlowerid{segmentations}~=~\ocwupperid{List.}\ocwlowerid{map}~\ocwlowerid{forget\_index}~\ocwlowerid{solutions}~$\ocwkw{in}\ocweol
\ocwindent{4.50em}
$\ocwupperid{Scl\_parser.}\ocwlowerid{print\_scl}~\ocwlowerid{segmentations}$\ocweol
\ocwindent{3.00em}
$\mid{}~\ocwlowerid{\_}~\rightarrow{}~()$\ocweol
\ocwindent{3.00em}
......@@ -43485,13 +43421,13 @@ $]$\ocweol
;\medskip
\ocwendcode{}\ocwindent{0.00em}
NB This reader is parametrized by an encoding function, that parses the
NB This reader is parameterized by an encoding function, that parses the
input as a list of words, according to various transliteration schemes.
However, the use of "decode" below to compute the romanisation and devanagari
renderings does a conversion through VH transliteration which may not be
faithful to encodings which represent the sequence of phonemes t and h.
\ocweol
\label{reader.ml:5865}%
\label{reader.ml:5991}%
\medskip
\ocwbegincode{}\ocwindent{0.00em}
$\ocwlowerid{value}~\ocwlowerid{process\_input}~\ocwlowerid{text}~\ocwlowerid{us}~\ocwlowerid{mode}~\ocwlowerid{topic}~(\ocwlowerid{input}:$\ocwbt{string}$)~\ocwlowerid{encode}~\ocwlowerid{cpts}~=~$\ocweol
......@@ -43573,7 +43509,7 @@ $\ocwupperid{List.}\ocwlowerid{sort}~\ocwlowerid{compare\_index}~\ocwlowerid{cpt
\ocwendcode{}\ocwindent{0.00em}
Standard format of cgi arguments
\ocweol
\label{reader.ml:7391}%
\label{reader.ml:7517}%
\medskip
\ocwbegincode{}\ocwindent{0.00em}
$\ocwlowerid{value}~\ocwlowerid{arguments}~\ocwlowerid{translit}~\ocwlowerid{lex}~\ocwlowerid{cache}~\ocwlowerid{st}~\ocwlowerid{us}~\ocwlowerid{cp}~\ocwlowerid{input}~\ocwlowerid{topic}~\ocwlowerid{abs}~\ocwlowerid{cpts}~=$\ocweol
......@@ -43786,16 +43722,16 @@ a specific solution. It basically replays reading until this specific solution
\ocwindent{0.00em}
\ocwkw{open}~$\ocwupperid{Checkpoints};$\ocweol
\ocwindent{0.00em}
\ocwkw{open}~$\ocwupperid{Uoh\_interface};~$\ocwbc{} Interface with UoH dependency parser \ocwec{}\medskip
\ocwkw{open}~$\ocwupperid{Scl\_parser};~$\ocwbc{} Interface with UoH dependency parser \ocwec{}\medskip
\label{parser.ml:1132}%
\label{parser.ml:1129}%
\ocwindent{0.00em}
\ocwkw{module}~$\ocwupperid{Prel}~=~$\ocwkw{struct}~\ocwbc{} Parser's lexer prelude \ocwec{}\medskip
\ocwendcode{}\ocwindent{0.00em}
prelude is executed by Lexer when initialisation of transducers fails
\ocweol
\label{parser.ml:1259}%
\label{parser.ml:1256}%
\medskip
\ocwbegincode{}\ocwindent{0.00em}
$\ocwlowerid{value}~\ocwlowerid{prelude}~()~=~$\ocwkw{do}\ocweol
......@@ -43832,7 +43768,7 @@ $\ocwlowerid{value}~\ocwlowerid{iterate}~=~$\ocwbt{ref}~$\ocwupperid{True}~$\ocw
\ocwindent{0.00em}
;\medskip
\label{parser.ml:1787}%
\label{parser.ml:1784}%
\ocwindent{0.00em}
\ocwkw{module}~$\ocwupperid{Lexer\_control}~=~$\ocwkw{struct}\ocweol
\ocwindent{0.50em}
......@@ -43852,10 +43788,6 @@ $\ocwlowerid{value}~\ocwlowerid{out\_chan}~=~\ocwlowerid{output\_channel};$\ocwe
\ocwindent{0.00em}
;\ocweol
\ocwindent{0.00em}
\ocwkw{module}~$\ocwupperid{Ext}~=~\ocwupperid{UOH}~\ocwupperid{Lex}~$\ocweol
\ocwindent{0.00em}
;~\ocweol
\ocwindent{0.00em}
$\ocwlowerid{value}~\ocwlowerid{rpc}~=~\ocwlowerid{remote\_server\_host}~$\ocweol
\ocwindent{0.00em}
\ocwkw{and}~$\ocwlowerid{remote}~=~$\ocwbt{ref}~$\ocwupperid{False}~$\ocwbc{} local invocation of cgi by default \ocwec{}~\ocweol
......@@ -43870,7 +43802,7 @@ $\ocwlowerid{value}~\ocwlowerid{rpc}~=~\ocwlowerid{remote\_server\_host}~$\ocweo
\ocwindent{0.00em}
\ocwkw{open}~$\ocwupperid{Paraphrase};~$\ocwbc{} \ocwbegindcode{}$\ocwlowerid{display\_penalties}~\ocwlowerid{print\_sem}~\ocwlowerid{print\_role}$\ocwenddcode{} \ocwec{}\medskip
\label{parser.ml:2321}%
\label{parser.ml:2293}%
\ocwindent{0.00em}
$\ocwlowerid{value}~\ocwlowerid{query}~=~$\ocwbt{ref}~\ocwstring{""}~\ocwbc{} ugly - stores the query string \ocwec{}\ocweol
\ocwindent{0.00em}
......@@ -43982,9 +43914,11 @@ $]~$\^{}~$\ocwlowerid{html\_break})$\ocweol
\ocwindent{1.00em}
;~$\ocwlowerid{pl}~(\ocwlowerid{xml\_empty}~$\ocwstring{"p"}$)~$\ocweol
\ocwindent{1.00em}
;~\ocwkw{if}~$\ocwlowerid{scl\_toggle}~$\ocwkw{then}~\ocwbc{} Call SCL parser \ocwec{}~\ocweol
;~\ocwkw{if}~$\ocwlowerid{scl\_toggle}~$\ocwkw{then}~\ocwbc{} Call SCL parser \ocwec{}\ocweol
\ocwindent{3.50em}
$\ocwupperid{Ext.}\ocwlowerid{print\_ext}~[~(1,\ocwupperid{List.}\ocwlowerid{rev}~\ocwlowerid{output})~]~$\ocweol
\ocwkw{let}~$\ocwlowerid{segments}~=~\ocwupperid{List.}\ocwlowerid{map}~($\ocwkw{fun}~$(\ocwlowerid{ph},\ocwlowerid{w},\ocwlowerid{\_})~\rightarrow{}~(\ocwlowerid{ph},\ocwlowerid{w}))~\ocwlowerid{output}~$\ocwkw{in}\ocweol
\ocwindent{3.50em}
$\ocwupperid{Scl\_parser.}\ocwlowerid{print\_scl}~[~\ocwupperid{List.}\ocwlowerid{rev}~\ocwlowerid{segments}~]~$\ocweol
\ocwindent{3.50em}
\ocwkw{else}~$()~$\ocweol
\ocwindent{2.00em}
......@@ -44274,21 +44208,13 @@ $]$\ocweol
\ocwindent{4.00em}
\}\ocweol
\ocwindent{2.00em}
\ocwkw{with}~$[~\ocwupperid{Truncation}~\rightarrow{}~$\ocwkw{do}\ocweol
\ocwindent{5.50em}
\{~$\ocwlowerid{pl}~(\ocwlowerid{html\_red}~$\ocwstring{"Solution\ocwvspace{}not\ocwvspace{}found"}$)$\ocweol
\ocwindent{5.50em}
;~$\ocwlowerid{pl}~\ocwlowerid{html\_break}~$\ocweol
\ocwindent{5.50em}
\}\ocweol
\ocwindent{4.50em}
$]$\ocweol
\ocwkw{with}~$[~\ocwupperid{Truncation}~\rightarrow{}~\ocwlowerid{pl}~(\ocwlowerid{html\_red}~$\ocwstring{"Solution\ocwvspace{}not\ocwvspace{}found"}~\^{}~$\ocwlowerid{html\_break})~]$\ocweol
\ocwindent{1.00em}
\}\ocweol
\ocwindent{0.00em}
;\medskip
\label{parser.ml:10372}%
\label{parser.ml:10361}%
\ocwindent{0.00em}
$\ocwlowerid{value}~\ocwlowerid{sort\_check}~\ocwlowerid{cpts}~=~$\ocweol
\ocwindent{1.00em}
......@@ -44298,7 +44224,7 @@ $\ocwupperid{List.}\ocwlowerid{sort}~\ocwlowerid{compare\_index}~\ocwlowerid{cpt
\ocwindent{0.00em}
;\medskip
\label{parser.ml:10485}%
\label{parser.ml:10474}%
\ocwindent{0.00em}
$\ocwlowerid{value}~\ocwlowerid{parser\_engine}~()~=~$\ocwkw{do}\ocweol
\ocwindent{0.00em}
......@@ -44370,17 +44296,14 @@ $\mid{}~$\ocwstring{"n"}~$\rightarrow{}~\ocwupperid{Some}~$\ocwstring{"tat"}\ocw
\ocwindent{4.00em}
$\mid{}~\ocwlowerid{\_}~\rightarrow{}~\ocwupperid{None}$\ocweol
\ocwindent{4.00em}
$]~$\ocweol
\ocwindent{2.00em}
\ocwbc{} File where to store locally the taggings - only for \ocwbegindcode{}$\ocwupperid{Station}$\ocwenddcode{} platform \ocwec{}\ocweol
\ocwindent{2.00em}
\ocwkw{and}~$\ocwlowerid{corpus\_file}~=~$\ocwbc{} optionally transmitted by argument \ocwstring{"out\_file"} \ocwec{}\ocweol
\ocwindent{4.00em}
\ocwkw{try}~\ocwkw{let}~$\ocwlowerid{file\_name}~=~\ocwupperid{List.}\ocwlowerid{assoc}~$\ocwstring{"out\_file"}~$\ocwlowerid{alist}~$\ocwbc{} do not use get \ocwec{}~\ocwkw{in}~\ocweol
\ocwindent{6.00em}
$\ocwupperid{Some}~\ocwlowerid{file\_name}~$\ocweol
\ocwindent{4.00em}
\ocwkw{with}~$[~\ocwupperid{Not\_found}~\rightarrow{}~\ocwupperid{Some}~\ocwlowerid{regression\_file\_name}~]~$\ocwkw{in}\ocweol
$]~$\ocwkw{in}\ocweol
\ocwindent{0.50em}
\ocwbc{} Corpus interaction disabled
\ocwbc{} File where to store locally the taggings - only for \ocwbegindcode{}$\ocwupperid{Station}$\ocwenddcode{} platform \ocwec{}
\ocwbegindcode{}\ocwkw{let}~$\ocwlowerid{corpus\_file}~=~(\times{}~\ocwlowerid{optionally}~\ocwlowerid{transmitted}~\ocwlowerid{by}~\ocwlowerid{argument}~$\ocwstring{"out\_file"}~$\times{})
~$\ocwkw{try}~\ocwkw{let}~$\ocwlowerid{file\_name}~=~\ocwupperid{List}.\ocwlowerid{assoc}~$\ocwstring{"out\_file"}~$\ocwlowerid{alist}~(\times{}~$\ocwkw{do}~$\lnot{}~\ocwlowerid{use}~\ocwlowerid{get}~\times{})~$\ocwkw{in}~
~$\ocwupperid{Some}~\ocwlowerid{file\_name}~
~$\ocwkw{with}~[~$\ocwupperid{Not\_found}~\rightarrow{}~\ocwupperid{Some}~\ocwlowerid{regression\_file\_name}~]~$\ocwkw{in}\ocwenddcode{} \ocwec{}\ocweol
\ocwindent{0.00em}
\ocwbc{} Regression disabled
\ocwbegindcode{}\ocwkw{let}~$()~=~$\ocwkw{if}~$\ocwupperid{Paths}.\ocwlowerid{platform}~=~$\ocwstring{"Station"}~\ocwkw{then}~\ocwkw{match}~$\ocwlowerid{corpus\_file}~$\ocwkw{with}~
......@@ -47181,437 +47104,6 @@ $]$\ocweol
\ocwindent{0.00em}
;\ocweol
\ocweol
\ocwendcode{}\typeout{OcamlWeb file Reader_plugin.ml}
\ocwmodule{Reader\_plugin}
\label{reader_plugin.ml:0}%
This is an adaptation of module Reader from Skt Heritage engine for
external call as a plug-in. It prints on \ocwbegindcode{}$\ocwlowerid{stdout}$\ocwenddcode{} an html document giving
segmentation/tagging of its input.
It computes a penalty of the various solutions, and returns all solutions
with minimal penalties (with a further preference for the solutions
having a minimum number of segments), using Constraints for ranking.
\ocweol
\label{reader_plugin.ml:1072}%
\medskip
\ocwbegincode{}\ocwindent{0.00em}
\ocwkw{open}~$\ocwupperid{Encode};$\ocweol
\ocwindent{0.00em}
\ocwkw{open}~$\ocwupperid{Canon};$\ocweol
\ocwindent{0.00em}
\ocwkw{open}~$\ocwupperid{Html};$\ocweol
\ocwindent{0.00em}
\ocwkw{open}~$\ocwupperid{Web};~$\ocwbc{} ps, pl, etc. abort truncation \ocwec{}\ocweol
\ocwindent{0.00em}
\ocwkw{open}~$\ocwupperid{Cgi};$\ocweol
\ocwindent{0.00em}
\ocwkw{open}~$\ocwupperid{Morphology};~$\ocweol
\ocwindent{0.00em}
\ocwkw{open}~$\ocwupperid{Phases};$\medskip
\label{reader_plugin.ml:1196}%
\ocwindent{0.00em}
\ocwkw{module}~$\ocwupperid{Prelude}~=~$\ocwkw{struct}\ocweol
\ocwindent{0.50em}
$\ocwlowerid{value}~\ocwlowerid{prelude}~()~=~()$\ocweol
\ocwindent{0.00em}
;\ocweol
\ocwindent{0.50em}
\ocwkw{end}~\ocwbc{} Prelude \ocwec{}\ocweol
\ocwindent{0.00em}
;\ocweol
\ocwindent{0.00em}
$\ocwlowerid{value}~\ocwlowerid{iterate}~=~$\ocwbt{ref}~$\ocwupperid{True}~$\ocwbc{} by default a chunk is a list of words \ocwec{}\ocweol
\ocwindent{0.00em}
\ocwkw{and}~$\ocwlowerid{complete}~=~$\ocwbt{ref}~$\ocwupperid{True}~$\ocwbc{} by default we call the fuller segmenter \ocwec{}\ocweol
\ocwindent{0.00em}
;\ocweol
\ocwindent{0.00em}
\ocwkw{module}~$\ocwupperid{Lexer\_control}~=~$\ocwkw{struct}\ocweol
\ocwindent{0.50em}
$\ocwlowerid{value}~\ocwlowerid{star}~=~\ocwlowerid{iterate};$\ocweol
\ocwindent{0.50em}
$\ocwlowerid{value}~\ocwlowerid{full}~=~\ocwlowerid{complete};$\ocweol
\ocwindent{0.50em}
$\ocwlowerid{value}~\ocwlowerid{out\_chan}~=~$\ocwbt{ref}~$\ocwlowerid{stdout};~$\ocwbc{} cgi writes on standard output channel \ocwec{}\ocweol
\ocwindent{0.00em}
\ocwkw{end}~\ocwbc{} \ocwbegindcode{}$\ocwupperid{Lexer\_control}$\ocwenddcode{} \ocwec{}\ocweol
\ocwindent{0.00em}
;\ocweol
\ocwindent{0.00em}
\ocwkw{module}~$\ocwupperid{Lex}~=~\ocwupperid{Lexer.Lexer}~\ocwupperid{Prelude}~\ocwupperid{Lexer\_control}$\ocweol
\ocwindent{0.00em}
;\ocweol
\ocwindent{0.00em}
\ocwkw{type}~$\ocwlowerid{mode}~=~[~\ocwupperid{Tag}~\mid{}~\ocwupperid{Parse}~\mid{}~\ocwupperid{Analyse}~]~$\ocwbc{} Segmentation is now obsolete \ocwec{}\ocweol
\ocwindent{0.00em}
;\ocweol
\ocwindent{0.00em}
\ocwbc{} Builds the penalty stack, grouping together equi-penalty items. \ocwec{}\ocweol
\ocwindent{0.00em}
\ocwbc{} Beware, \ocwbegindcode{}$\ocwlowerid{make\_groups}$\ocwenddcode{} reverses the list of tags. \ocwec{}\ocweol
\ocwindent{0.00em}
$\ocwlowerid{value}~\ocwlowerid{make\_groups}~\ocwlowerid{tagger}~=~\ocwlowerid{comp\_rec}~1~[\,]~$\ocweol
\ocwindent{1.00em}
$\ocwlowerid{where}~$\ocwkw{rec}~$\ocwlowerid{comp\_rec}~\ocwlowerid{seg}~\ocwlowerid{stack}~=~$\ocwkw{fun}~\ocwbc{} going forward in time \ocwec{}\ocweol
\ocwindent{1.00em}
$[~[\,]~\rightarrow{}~\ocwlowerid{stack}~$\ocwbc{} result goes backward in time \ocwec{}\ocweol
\ocwindent{1.00em}
$\mid{}~[~(\ocwlowerid{phase},\ocwlowerid{rword},\ocwlowerid{\_})~::~\ocwlowerid{rest}~]~\rightarrow{}~$\ocwbc{} we ignore euphony transition \ocwec{}\ocweol
\ocwindent{3.00em}
\ocwkw{let}~$\ocwlowerid{word}~=~\ocwupperid{List.}\ocwlowerid{rev}~\ocwlowerid{rword}~$\ocwkw{in}~\ocweol
\ocwindent{3.00em}
\ocwkw{let}~$\ocwlowerid{keep}~=~$\ocwkw{let}~$\ocwlowerid{tags}~=~\ocwlowerid{tagger}~\ocwlowerid{phase}~\ocwlowerid{word}~$\ocwkw{in}\ocweol
\ocwindent{8.50em}
$[~\ocwupperid{Constraints.}\ocwlowerid{roles\_of}~\ocwlowerid{seg}~\ocwlowerid{word}~\ocwlowerid{tags}~::~\ocwlowerid{stack}~]~$\ocwkw{in}\ocweol
\ocwindent{3.00em}
$\ocwlowerid{comp\_rec}~(\ocwlowerid{seg}+1)~\ocwlowerid{keep}~\ocwlowerid{rest}$\ocweol
\ocwindent{1.00em}
$]~$\ocweol
\ocwindent{0.00em}
;\medskip
\ocwendcode{}\ocwindent{0.00em}
Computes minimum penalty in Parse mode
\ocweol
\label{reader_plugin.ml:2302}%
\medskip
\ocwbegincode{}\ocwindent{0.00em}
$\ocwlowerid{value}~\ocwlowerid{minimum\_penalty}~\ocwlowerid{output}~=$\ocweol
\ocwindent{1.00em}
\ocwkw{let}~$\ocwlowerid{tagger}~=~\ocwupperid{Lex.}\ocwlowerid{extract\_lemma}~$\ocwkw{in}\ocweol
\ocwindent{1.00em}
\ocwkw{let}~$\ocwlowerid{out}~=~\ocwupperid{List.}\ocwlowerid{rev}~\ocwlowerid{output}~$\ocwkw{in}\ocweol
\ocwindent{1.00em}
\ocwkw{let}~$\ocwlowerid{groups}~=~\ocwlowerid{make\_groups}~\ocwlowerid{tagger}~\ocwlowerid{out}~$\ocwkw{in}\ocweol
\ocwindent{1.00em}
\ocwkw{if}~$\ocwlowerid{groups}=[\,]~$\ocwkw{then}~$\ocwlowerid{failwith}~$\ocwstring{"Empty\ocwvspace{}penalty\ocwvspace{}stack\ocwvspace{}!"}~\ocwkw{else}~\ocweol
\ocwindent{1.00em}
\ocwkw{let}~$\ocwlowerid{sort\_groups}~=~\ocwupperid{Constraints.}\ocwlowerid{sort\_flatten}~\ocwlowerid{groups}~$\ocwkw{in}~\ocweol
\ocwindent{1.00em}
\ocwkw{let}~$\ocwlowerid{min\_pen}~=~$\ocwkw{match}~$\ocwlowerid{sort\_groups}~$\ocwkw{with}~\ocweol