Commit 049c3c57 authored by Gérard Huet's avatar Gérard Huet

Fix bug printing of kridantas in Parser

parent 6e24b559
......@@ -310,8 +310,8 @@ value print_segment_roles print_sems seg_num (phase,rword,_) =
[ Atomic tags ->
process_kridanta [] seg_num phase word tags
| Preverbed (_,phase) pvs form tags ->
process_kridanta pvs seg_num phase form tags
| Taddhita (ph,form) sfx sfx_phase sfx_tags ->
process_kridanta pvs seg_num phase form tags
| Taddhita (ph,form) sfx sfx_phase sfx_tags ->
match tags_of ph form with
[ Atomic _ -> (* stem, tagged as iic *)
process_taddhita [] seg_num ph form sfx_phase sfx sfx_tags
......@@ -358,7 +358,7 @@ value print_projection phase rword ((_,m) as index) = do
; let word = mirror rword in
match tags_of phase word with
[ Atomic tags -> print_unitag [] phase word tags index
| Preverbed (_,phase) pvs form tags -> print_unitag pvs phase word tags index
| Preverbed (_,phase) pvs form tags -> print_unitag pvs phase form tags index
| Taddhita (ph,form) sfx sfx_phase sfx_tags ->
match tags_of ph form with
[ Atomic _ -> print_uni_taddhita [] m phase form sfx sfx_phase sfx_tags
......
......@@ -24,7 +24,7 @@ value out_mode = ref None
value set_cho () = Arg.parse
[ ("-fr", Arg.Unit (fun () -> out_mode.val:=Some French), "French")
; ("-en", Arg.Unit (fun () -> out_mode.val:=Some English), "English")
; ("", Arg.Unit (fun () -> out_mode.val:=None), "cgi output on stdout")
; ("", Arg.Unit (fun () -> out_mode.val:=None), "default language for cgi")
]
(fun s -> raise (Arg.Bad s))
"Usage: mk_reader_page -en or mk_reader_page -fr or mk_reader_page"
......
......@@ -9,8 +9,8 @@
(* Morphology interface *)
(* Used by [Inflected] for morphology generation, and by [Morpho] for
further treatment *)
(* Used by [Inflected] for inflective morphology generation,
and by [Morpho] for further treatment *)
open Skt_morph;
......@@ -19,7 +19,7 @@ open Skt_morph;
type inflexion_tag = (* vibhakti *)
[ Noun_form of gender and number and case (* declined nominal *)
| Part_form of verbal and gender and number and case (* declined participle *)
| Bare_stem (* iic forms *)
| Bare_stem (* iic forms *)
| Avyayai_form (* iic forms of avyayiibhaava cpds *)
| Avyayaf_form (* ifc forms of avyayiibhaava cpds *)
| Verb_form of finite and number and person (* finite conjugated root forms *)
......@@ -29,8 +29,8 @@ type inflexion_tag = (* vibhakti *)
| Auxi_form (* verbal auxiliaries forms *)
| Unanalysed (* un-analysable segments *)
| PV of list string (* Preverb sequences *)
(* NB preverb sequences are collated separately by [Roots] module, and
they do not appear in solutions, by compression of [Dispatcher.validate]. *)
(* NB preverb sequences are collated separately by [Roots] module, and they do not
appear in solutions, removed by compression of [Dispatcher.validate]. *)
]
and inflexions = list inflexion_tag
;
......@@ -41,37 +41,37 @@ and lemmas = list lemma
type multitag = list (Word.delta * inflexions)
;
type morphology =
{ nouns : inflected_map
; nouns2 : inflected_map
; prons : inflected_map
; roots : inflected_map
; krids : inflected_map
; voks : inflected_map
; lopas : inflected_map
; lopaks : inflected_map
; indes : inflected_map
; absya : inflected_map
; abstvaa : inflected_map
; iics2 : inflected_map
; iics : inflected_map
; iifs : inflected_map
; iiks : inflected_map
; iivs : inflected_map
; peris : inflected_map
; auxis : inflected_map
; auxiks : inflected_map
{ nouns : inflected_map
; nouns2 : inflected_map
; prons : inflected_map
; roots : inflected_map
; krids : inflected_map
; voks : inflected_map
; lopas : inflected_map
; lopaks : inflected_map
; indes : inflected_map
; absya : inflected_map
; abstvaa : inflected_map
; iics2 : inflected_map
; iics : inflected_map
; iifs : inflected_map
; iiks : inflected_map
; iivs : inflected_map
; peris : inflected_map
; auxis : inflected_map
; auxiks : inflected_map
; auxiicks : inflected_map
; vocas : inflected_map
; invs : inflected_map
; ifcs : inflected_map
; ifcs2 : inflected_map
; inftu : inflected_map
; kama : inflected_map
; iiys : inflected_map
; avys : inflected_map
; sfxs : inflected_map
; isfxs : inflected_map
; caches : inflected_map
; vocas : inflected_map
; invs : inflected_map
; ifcs : inflected_map
; ifcs2 : inflected_map
; inftu : inflected_map
; kama : inflected_map
; iiys : inflected_map
; avys : inflected_map
; sfxs : inflected_map
; isfxs : inflected_map
; caches : inflected_map
}
;
......
......@@ -124,28 +124,28 @@ value analyse query output =
; match threshold with
[ None -> ()
| Some p -> do
{ ps html_break
; ps (html_red ("Truncated penalty " ^ string_of_int p ^ " or more"))
; ps html_break
{ html_break |> ps
; html_red ("Truncated penalty " ^ string_of_int p ^ " or more") |> ps
; html_break |> ps
}
]
}
;
value print_sems word morphs = do
{ ps (span_begin Latin12)
; ps "{ "
; let bar () = ps " | "
{ span_begin Latin12 |> ps
; "{ " |> ps
; let bar () = " | " |> ps
and sem = Canon.decode word in
List2.process_list_sep (print_sem sem) bar morphs
; ps " }"
; ps span_end
; " }" |> ps
; span_end |> ps
}
;
value print_out seg_num segment = do
(* Contrarily to Reader, we discard phonetic information. *)
{ ps tr_begin
{ tr_begin |> ps
; Lex.print_segment_roles print_sems seg_num segment
; ps tr_end
; tr_end |> ps
; seg_num+1
}
;
......@@ -335,7 +335,7 @@ value parser_engine () = do
| None -> ()
]
else () in] *)
let proj = (* checks for parsing mode *)
let proj = (* checks for parsing mode or final unique tags listing *)
try let url_encoded_proj = List.assoc "p" alist in (* do not use get *)
Some (parse_proj (decode_url url_encoded_proj))
with [ Not_found -> do
......
......@@ -59,6 +59,7 @@ and tense =
| Injunctive of aor_class (* (le.t) - also Prohibitive with maa *)
| Benedictive (* Precative: optative aorist (aazirlif) *)
| Conditional (* Preterit of future (l.rf) *)
(*| Subjunctive (* le.t *) TODO *)
]
;
(* NB from Indo-European: the present stem has the imperfective aspect,
......@@ -96,7 +97,7 @@ and participle = (* participles *)
Infinitives are similar to dative substantival forms, periphrastic perfect
forms are associated with an auxiliary verb in the perfect.
Absolutives split into root absolutives in -tvaa and absolutives in -ya
that must be prefixed with a preverb. *)
that must be prefixed with a preverb. Absolutives in -aam (.namul) are in both. *)
type modal = (conjugation * invar)
and invar =
[ Infi (* infinitive (tumun) *)
......@@ -113,8 +114,8 @@ type sadhana = (* karaka, action or absolutive - coarser than krit *)
| Absolu
]
;
(* Primary nominal formations *)
type nominal = (conjugation * krit)
(* Primary nominal formations (k.rdantas) *)
type nominal = (conjugation * krit)
and krit = (* coarser than Paninian krit suffixes *)
[ Agent_aka (* .nvul \Pan{3,1,133} \Pan{3,3,108-109} -aka -ikaa v.rddhi
.svun \Pan{3,1,145} trade gu.na f. -akii
......@@ -131,7 +132,7 @@ and krit = (* coarser than Paninian krit suffixes *)
\Pan{3,2,76} root autonomous mnf.
+ .tak \Pan{3,2,8} root ifc (f. -ii)
+ .ta \Pan{3,2,20} -kara ifc (f. -ii) habitual, enjoy
+ ka \Pan{3,2,3} root -aa, amuie, ifcno (no Preverb) f. ii *)
+ ka \Pan{3,2,3} root -aa, amuie, ifcno (no preverb) f. ii *)
| Agent_a (* ac \Pan{3,1,134} gu.na m. -a f. -aa
.na \Pan{3,1,140-143} v.rddhi (f. -aa)
ka \Pan{3,1,135-136;144} -gu.na
......@@ -150,10 +151,10 @@ and krit = (* coarser than Paninian krit suffixes *)
| Action_i (* ki \Pan{3,3,92-93} -i f. *)
| Action_root (* unknown krit of non-agent noun *)
| Object_root (* we should probably lump action and object in [Non_agent] *)
| Object_a (* ka -a n. *)
| Object_a (* ka -a n. *)
| Instrument (* ka \Pan{3,1,136} 0/amui n. *)
| Instra (* .s.tran -tra n. -trii f. traa f. *)
| Agent_u (* san+u -u on des stem *)
| Instra (* .s.tran -tra n. -trii f. traa f. *)
| Agent_u (* san+u -u on des stem *)
| Action_aa (* san+a+.taap \Pan{3,3,102} -aa on des stem *)
| Abstract (* abstract nouns n. -as u.naadi suffix *)
]
......
......@@ -590,7 +590,9 @@ analyser: ML/reader ML/parser ML/interface ML/user_aid
cp ML/parser $(CGIDIR)$(CGIPARSER)
cp ML/interface $(CGIDIR)$(CGIGRAPH)
cp ML/user_aid $(CGIDIR)$(CGIUSER)
# following is special interface for Sanskrit Library invocation
cp ML/mk_reader_page $(CGIDIR)skt_heritage # $(CGIINTERFACE)
# following is deprecated
# cp ML/tagger $(CGIDIR)$(CGITAGGER)
indexers: ML/indexer ML/indexerd
......
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