Commit e5e3a4d6 authored by Gérard Huet's avatar Gérard Huet

Minor fixes, new MW alignment, lexicon acquisition

parent dee79c87
...@@ -32,8 +32,8 @@ canon.cmo : ../ZEN/word.cmo ...@@ -32,8 +32,8 @@ canon.cmo : ../ZEN/word.cmo
canon.cmx : ../ZEN/word.cmx canon.cmx : ../ZEN/word.cmx
min_lexer.cmo : min_lexer.cmo :
min_lexer.cmx : min_lexer.cmx :
transduction.cmo : ../ZEN/zen_lexer.cmo min_lexer.cmo transduction.cmo : min_lexer.cmo
transduction.cmx : ../ZEN/zen_lexer.cmx min_lexer.cmx transduction.cmx : min_lexer.cmx
encode.cmo : ../ZEN/word.cmo transduction.cmo phonetics.cmo canon.cmo encode.cmo : ../ZEN/word.cmo transduction.cmo phonetics.cmo canon.cmo
encode.cmx : ../ZEN/word.cmx transduction.cmx phonetics.cmx canon.cmx encode.cmx : ../ZEN/word.cmx transduction.cmx phonetics.cmx canon.cmx
order.cmo : order.cmo :
......
...@@ -368,10 +368,10 @@ morpho.cmx segmenter1.cmx tagger1.cmx -o tagger1 ...@@ -368,10 +368,10 @@ morpho.cmx segmenter1.cmx tagger1.cmx -o tagger1
# adapt to your need in modules # adapt to your need in modules
# NB best used by first hiding all .mli, make clean, make depend # NB best used by first hiding all .mli, make clean, make depend
debug: gen.cmo version.cmo date.cmo word.cmo min_lexer.cmo order.cmo \ debug: gen.cmo version.cmo date.cmo word.cmo min_lexer.cmo order.cmo \
canon.cmo phonetics.cmo transduction.cmo padapatha.cmo sanskrit.cmo \ canon.cmo phonetics.cmo min_lexer.cmo transduction.cmo padapatha.cmo \
sandhi.cmo int_sandhi.cmo share.cmo trie.cmo deco.cmo skt_lexer.cmo \ sanskrit.cmo sandhi.cmo int_sandhi.cmo share.cmo trie.cmo deco.cmo \
encode.cmo order.cmo lexmap.cmo inflected.cmo parts.cmo verbs.cmo \ skt_lexer.cmo encode.cmo order.cmo lexmap.cmo inflected.cmo parts.cmo \
morpho_html.cmo cgi.cmo html.cmo web.cmo indexer.cmo declension.cmo verbs.cmo morpho_html.cmo cgi.cmo html.cmo web.cmo indexer.cmo declension.cmo
(cat debug.ml ; cat -) | ocaml -I +camlp4 -I . -I $(ZEN) (cat debug.ml ; cat -) | ocaml -I +camlp4 -I . -I $(ZEN)
morpho_debug: list2.cmo word.cmo deco.cmo morpho_string.cmo paths.cmo \ morpho_debug: list2.cmo word.cmo deco.cmo morpho_string.cmo paths.cmo \
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
(* *) (* *)
(* Gérard Huet & Pawan Goyal *) (* Gérard Huet & Pawan Goyal *)
(* *) (* *)
(* ©2017 Institut National de Recherche en Informatique et en Automatique *) (* ©2019 Institut National de Recherche en Informatique et en Automatique *)
(**************************************************************************) (**************************************************************************)
(****************************************************************) (****************************************************************)
...@@ -28,7 +28,7 @@ open Gen; ...@@ -28,7 +28,7 @@ open Gen;
#load "version.cmo"; #load "version.cmo";
open Version; open Version;
#load "date.cmo"; #load "date.cmo";
#load "html.cmo"; (* #load "html.cmo"; *)
(* #load "web.cmo"; (* #load "web.cmo";
open Web; open Web;
#load "cgi.cmo"; *) #load "cgi.cmo"; *)
...@@ -38,6 +38,7 @@ open Canon; ...@@ -38,6 +38,7 @@ open Canon;
open Phonetics; open Phonetics;
open List; open List;
#load "min_lexer.cmo";
#load "transduction.cmo"; #load "transduction.cmo";
open Transduction; open Transduction;
#load "encode.cmo"; #load "encode.cmo";
......
...@@ -782,8 +782,7 @@ value escape s = ...@@ -782,8 +782,7 @@ value escape s =
; ("'", "apos") ; ("'", "apos")
; ("<", "lt") ; ("<", "lt")
; (">", "gt") ; (">", "gt")
] ] in
in
let escape s = let escape s =
try "&" ^ List.assoc s conversion_tbl ^ ";" with [ Not_found -> s ] in try "&" ^ List.assoc s conversion_tbl ^ ";" with [ Not_found -> s ] in
let special_chars = let special_chars =
......
...@@ -430,7 +430,7 @@ value enter1 entry = ...@@ -430,7 +430,7 @@ value enter1 entry =
| Indecl k w -> match k with | Indecl k w -> match k with
[ Adv | Part | Conj | Default | Prep | Tas -> [ Adv | Part | Conj | Default | Prep | Tas ->
add_morphind w delta (Ind_form k) add_morphind w delta (Ind_form k)
| Interj -> add_invoc w delta (Ind_form k) | Interj -> add_invoc w delta (Ind_form k)
| Avya -> () (* since generative *) | Avya -> () (* since generative *)
| Abs | Infl | Nota -> () (* no recording in morph tables *) | Abs | Infl | Nota -> () (* no recording in morph tables *)
(* Abs generated by absolutives of verbs, Infl by flexions of nouns, and (* Abs generated by absolutives of verbs, Infl by flexions of nouns, and
......
...@@ -4244,7 +4244,7 @@ value build_pron_a g stem entry = (* g=Mas ou g=Neu *) ...@@ -4244,7 +4244,7 @@ value build_pron_a g stem entry = (* g=Mas ou g=Neu *)
] in if pseudo_nominal then ] in if pseudo_nominal then
[ decline Abl "aat" :: [ decline Loc "e" :: [ decline Abl "aat" :: [ decline Loc "e" ::
[ decline Voc "a" :: l ] ] ] else l) [ decline Voc "a" :: l ] ] ] else l)
; (Dual, if entry = "ubhaya" (* no dual *) then [] ; (Dual, if entry = "ubhaya" (* no dual - dubious *) then []
else let l = else let l =
[ decline Nom (if g=Mas then "au" else "e") [ decline Nom (if g=Mas then "au" else "e")
; decline Acc (if g=Mas then "au" else "e") ; decline Acc (if g=Mas then "au" else "e")
...@@ -5809,8 +5809,8 @@ value enter_iiy entry = ...@@ -5809,8 +5809,8 @@ value enter_iiy entry =
; enter1 "anyatara" (Indecl Tas (code "anyataratas")) (* id *) ; enter1 "anyatara" (Indecl Tas (code "anyataratas")) (* id *)
; enter1 "dak.si.na" (Indecl Tas (code "dak.si.natas")) (* id *) ; enter1 "dak.si.na" (Indecl Tas (code "dak.si.natas")) (* id *)
; enter1 "avara" (Indecl Tas (code "avaratas")) (* \Pan{5,3,29} *) ; enter1 "avara" (Indecl Tas (code "avaratas")) (* \Pan{5,3,29} *)
; enter1 "uttara#1" (Indecl Tas (code "uttaratas")) (* check *) ; enter1 "uttara#1" (Indecl Tas (code "uttaratas")) (* on pn \Pan{5,3,7} ? *)
; enter1 "ubhaya" (Indecl Tas (code "ubhayatas")) (* check *) ; enter1 "ubhaya" (Indecl Tas (code "ubhayatas")) (* on pn \Pan{5,3,7} ? *)
*) *)
value tasil_extra () = do (* add non-generative tasils *) value tasil_extra () = do (* add non-generative tasils *)
{ enter1 "aze.sa" (Indecl Tas (code "aze.satas")) (* tasil on privative cpd *) { enter1 "aze.sa" (Indecl Tas (code "aze.satas")) (* tasil on privative cpd *)
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
(* *) (* *)
(* Gérard Huet & Pawan Goyal *) (* Gérard Huet & Pawan Goyal *)
(* *) (* *)
(* ©2018 Institut National de Recherche en Informatique et en Automatique *) (* ©2019 Institut National de Recherche en Informatique et en Automatique *)
(**************************************************************************) (**************************************************************************)
(* Pada defines the allowed padas (Para, Atma or Ubha) for (* Pada defines the allowed padas (Para, Atma or Ubha) for
...@@ -115,8 +115,8 @@ value voices_of = fun ...@@ -115,8 +115,8 @@ value voices_of = fun
| "dih" | "duh#1" | "dev#1" | "draa#2" | "dvi.s#1" | "dhaa#1" | "dhaav#1" | "dih" | "duh#1" | "dev#1" | "draa#2" | "dvi.s#1" | "dhaa#1" | "dhaav#1"
| "dhaav#2" | "dhuu#1" | "dh.r" | "dhva.ms" | "nah" | "naath" | "nij" | "nii#1" | "dhaav#2" | "dhuu#1" | "dh.r" | "dhva.ms" | "nah" | "naath" | "nij" | "nii#1"
| "nud" | "pac" | "paz" | "pa.th" | "pii.d" | "pu.s#1" | "puu#1" | "puuj" | "nud" | "pac" | "paz" | "pa.th" | "pii.d" | "pu.s#1" | "puu#1" | "puuj"
| "puuy" | "p.rth" | "prii" | "budh#1" | "bruu" | "bhak.s" | "bhaj" | "bharts" | "puuy" | "p.rth" | "prii" | "pru.s#1" | "budh#1" | "bruu" | "bhak.s"
| "bhaas#1" | "bhid#1" | "bh.r" | "bh.rjj" | "maa#4" | "bhaj" | "bharts" | "bhaas#1" | "bhid#1" | "bh.r" | "bh.rjj" | "maa#4"
| "mi" | "mith" | "mil" | "mii" | "muc#1" | "mud#1" | "m.r" | "m.rj" | "mi" | "mith" | "mil" | "mii" | "muc#1" | "mud#1" | "m.r" | "m.rj"
| "m.rdh" | "m.r.s" | "yaj#1" | "yaac" | "yu#1" | "yuj#1" | "rac" | "m.rdh" | "m.r.s" | "yaj#1" | "yaac" | "yu#1" | "yuj#1" | "rac"
| "ra~nj" | "ram" | "rah" | "raaj#1" | "ri" | "ric" | "rud#1" | "rudh#2" | "ra~nj" | "ram" | "rah" | "raaj#1" | "ri" | "ric" | "rud#1" | "rudh#2"
...@@ -173,14 +173,14 @@ svid2 1A 4P ...@@ -173,14 +173,14 @@ svid2 1A 4P
(* NB This will drive generation of verbal forms by Verbs. It may generate forms (* NB This will drive generation of verbal forms by Verbs. It may generate forms
not listed in the lexicon root entry, but needed for use with some preverbs, not listed in the lexicon root entry, but needed for use with some preverbs,
indicated in [voices_of_pv] below. indicated in [voices_of_pv] below.
Incorrect associations will be captured by Dispatcher. *) Incorrect associations will be captured at Reader time by Dispatcher. *)
value voices_of_gana g root = match g with value voices_of_gana g root = match g with
[ 1 -> match root with [ 1 -> match root with
[ "k.r.s" | "cur" | "budh#1" | "van" | "v.r#1" | "su#2" [ "k.r.s" | "cur" | "budh#1" | "van" | "v.r#1" | "su#2"
| "suu#1" | "suu#1"
-> Para -> Para
| "i" | "gha.t.t" | "ghuur.n" | ".damb" | "bhra.mz" | "mid" | "mok.s" | "i" | "gave.s" | "gha.t.t" | "ghuur.n" | ".damb" | "bhra.mz" | "mid"
| "lok" | "svid#2" | "mok.s" | "lok" | "svid#2"
-> Atma -> Atma
| "i.s#1" | ".r" (* ".r" Atma for pv sam \Pan{1,3,29} also "tap" *) | "i.s#1" | ".r" (* ".r" Atma for pv sam \Pan{1,3,29} also "tap" *)
| "j.rr" | "tap" | "daa#1" | "dh.r.s" | "as#2" | "kuc" | "j.rr" | "tap" | "daa#1" | "dh.r.s" | "as#2" | "kuc"
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
(* *) (* *)
(* Gérard Huet *) (* Gérard Huet *)
(* *) (* *)
(* ©2017 Institut National de Recherche en Informatique et en Automatique *) (* ©2019 Institut National de Recherche en Informatique et en Automatique *)
(**************************************************************************) (**************************************************************************)
(*i module Verbs : sig i*) (*i module Verbs : sig i*)
...@@ -15,5 +15,4 @@ value compute_conjugs : Word.word -> Conj_infos.root_infos -> unit; ...@@ -15,5 +15,4 @@ value compute_conjugs : Word.word -> Conj_infos.root_infos -> unit;
value compute_conjugs_stems : string -> Conj_infos.root_infos -> unit; value compute_conjugs_stems : string -> Conj_infos.root_infos -> unit;
value compute_extra : unit -> unit; value compute_extra : unit -> unit;
value fake_compute_conjugs : int (* [pr_class] *) -> string (* entry *) -> unit; value fake_compute_conjugs : int (* [pr_class] *) -> string (* entry *) -> unit;
(*i end; i*) (*i end; i*)
...@@ -8,4 +8,4 @@ ...@@ -8,4 +8,4 @@
(**************************************************************************) (**************************************************************************)
(* Generated by make version - see main Makefile *) (* Generated by make version - see main Makefile *)
value version="3.13" and version_date="2019-02-03"; value version="3.13" and version_date="2019-02-14";
VERSION='3.13' VERSION='3.13'
DATE='2019-02-03' DATE='2019-02-14'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment