Commit 0aa55e43 authored by Gérard Huet's avatar Gérard Huet

Fix notation - and + for unsandhied input

parent 862e107a
......@@ -711,7 +711,8 @@ value indic_unicode_point = fun
else "" (* homo index dropped *)
]
and matra_indic_unicode_point = fun
[ 0 -> (* - *) "70" (* necessary for iic form ending in consonant *)
[ -10 (* + *) (* necessary for word form ending in consonant *)
| 0 -> (* - *) "70" (* id for iics *)
| 1 -> (* a *) "" (* default *)
| 2 -> (* aa *) "3E"
| 3 -> (* i *) "3F"
......
......@@ -407,12 +407,12 @@ value rec react phase input output back occ = fun
] in
let cont = if choices=[] then back (* non deterministic continuation *)
else [ Choose phase input output occ choices :: back ] in
(* now we look for - or + pragma *)
(* now we look for - or + segmentation pragma *)
let (keep,cut,input') = match input with
[ [ 0 :: rest ] -> (* explicit "-" compound break hint *)
(ii_phase phase,True,rest)
| [ -10 :: rest ] -> (* mandatory segmentation + *)
(True,True,rest)
| [ -10 :: rest ] -> (* mandatory segmentation indicated by "+" *)
(True,True,rest)
| _ -> (True,False,input) (* no hint in input *)
] in
if accept && keep then
......@@ -425,10 +425,10 @@ value rec react phase input output back occ = fun
do { log_chunk contracted; continue cont }
else continue cont
| [ first :: _ ] -> (* we first try the longest matching word *)
let cont' = schedule phase input' contracted [] cont in
if cut then continue cont' else
if check_id_sandhi occ first then (* legitimate Id *)
let cont' = schedule phase input' contracted [] cont in
if cut then continue cont' else deter cont'
else if cut then continue cont else deter cont
deter cont' else deter cont
]
]
else if cut then continue cont else deter cont
......
......@@ -4756,19 +4756,15 @@ value build_num stem entry =
let decline case suff = (case,fix stem suff) in
enter entry (
[ Declined Noun (Deictic Numeral)
[ (Singular,
[ decline Voc "a"
; decline Nom "a"
; decline Acc "a"
])
; (Dual, if entry = "a.s.tan" then
[ (Dual, if entry = "a.s.tan" then
(* remains of dual form 8 as a pair of 4 *)
[ decline Voc "au"
; decline Nom "au"
[ decline Nom "au"
; decline Acc "au"
] else [])
; (Plural, let l =
[ decline Ins "abhis"
[ decline Nom "a" (* plural although no proper plural form Whitney§483 *)
; decline Acc "a"
; decline Ins "abhis"
; decline Dat "abhyas"
; decline Abl "abhyas"
; decline Gen "aanaam"
......@@ -4781,10 +4777,9 @@ value build_num stem entry =
] else l)
]
; Bare Noun (wrap stem 1)
; Cvi (wrap stem 4)
] @ (if entry = "a.s.tan" then
[ Bare Noun (wrap stem 2) (* a.s.taa *) ]
else if entry = "pa~ncan" then
[ Bare Noun (code "paa~nca"); Cvi (code "pa~ncii") ]
else []))
;
value build_kati entry =
......
......@@ -329,17 +329,17 @@ value rec react phase input output back occ = fun
let out = accrue segment output in
match validate out with
[ [] -> deter cont
| contracted -> match input' with
| contracted -> match input' with
[ [] -> if accepting phase then
if check_chunk contracted
then Some (contracted,cont) (* solution found *)
else continue cont
else continue cont
| [ first :: _ ] ->
if check_id_sandhi occ first then (* legitimate Id sandhi? *)
let cont' = schedule phase input' contracted [] cont in
if cut then continue cont' else deter cont'
else if cut then continue cont else deter cont
| [ first :: _ ] -> (* we first try the longest matching word *)
let cont' = schedule phase input' contracted [] cont in
if cut then continue cont' else
if check_id_sandhi occ first then (* legitimate Id *)
deter cont' else deter cont
]
]
else if cut then continue cont else deter cont
......
......@@ -8,4 +8,4 @@
(**************************************************************************)
(* Generated by make version - see main Makefile *)
value version="3.02" and version_date="2017-09-15";
value version="3.02" and version_date="2017-09-18";
VERSION='3.02'
DATE='2017-09-15'
DATE='2017-09-18'
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