...
 
Commits (6)
......@@ -4,7 +4,7 @@
(* *)
(* Gérard Huet *)
(* *)
(* ©2018 Institut National de Recherche en Informatique et en Automatique *)
(* ©2019 Institut National de Recherche en Informatique et en Automatique *)
(**************************************************************************)
(* CGI-bin indexerd for indexing in sanskrit dico without diacritics. *)
......@@ -64,10 +64,10 @@ value index_engine () =
(* TODO: adapt to MW search along Indexer *)
let url_encoded_entry = List.assoc "q" alist in
let str = decode_url url_encoded_entry in
try let word = Encode.code_skt_ref_d str (* normalization *) in do
try let dummy = Encode.code_skt_ref_d str (* normalization *) in do
{ answer_begin ()
; ps (div_begin Latin12)
; let words = Deco.assoc word dummies_deco in
; let words = Deco.assoc dummy dummies_deco in
match words with
[ [] -> do { ps (Morpho_html.skt_red str)
; ps " not found in Heritage dictionary"
......
......@@ -242,7 +242,7 @@ value is_conflicting ((w,tr,ph,k) as segment) =
else match_tr rst
]
]
else if (k'<=k && k'+l'-1>=k && l=1) then match_tr' tr'
else if (k'<=k && k'+l'-1=k && l=1) then match_tr' tr'
(* For the case with [l=1], this is to check whether w is the only
possible v for w', in which case it is an overlap returning a blue sign.
If w' has any other possible v's, there is a conflict. *)
......@@ -250,7 +250,7 @@ value is_conflicting ((w,tr,ph,k) as segment) =
[ [] -> does_conflict rest
| [ v :: rst ] -> match v with
[ [] -> does_conflict rest
| _ -> if v = w then match_tr' rst else True
| _ -> v = w || match_tr' rst
]
]
else True
......
......@@ -2179,7 +2179,7 @@ value build_neu_vas stem entry =
])
]
; Bare Noun (fix stem "vat") (* eg vidvat- *)
; Avyayaf (fix stem "vas")
; Avyayaf (fix stem "vas") (* vat Acc ? *)
]
;
(* i is dropped before u.s - Macdonnel §89a *)
......@@ -2220,7 +2220,7 @@ value build_neu_ivas stem entry =
])
]
; Bare Noun (fix stem "ivat")
; Avyayaf (fix stem "ivas")
; Avyayaf (fix stem "ivas") (* why not ivat Acc ? *)
]
;
value build_neu_red stem entry =
......@@ -2302,7 +2302,7 @@ value build_neu_at stem entry =
; decline Loc "tsu"
])
]
; Avyayaf (fix stem "tam")
; Avyayaf (fix stem "tam") (* why not Acc ? *)
]
;
value build_neu_mahat stem entry =
......@@ -2361,7 +2361,7 @@ value build_aatman entry =
])
]
; Bare Pron (code "aatma")
; Avyayaf (code "aatmam")
; Avyayaf (code "aatmam") (* aatmaanam Acc ? *)
]
;
value build_neu_yuvan entry =
......@@ -2401,7 +2401,7 @@ value build_neu_yuvan entry =
; decline Loc "uvasu"
])
]
; Avyayaf (fix stem "uvam")
; Avyayaf (fix stem "uvam") (* uva Acc ? *)
]
;
value build_neu_brahman entry =
......@@ -2441,7 +2441,7 @@ value build_neu_brahman entry =
])
]
; Bare Noun (code "brahma")
; Avyayaf (code "brahmam")
; Avyayaf (code "brahma") (* Acc *)
]
;
value build_aksan stem entry =
......@@ -2488,6 +2488,7 @@ value build_aksan stem entry =
])
]
; Bare Noun (fix stem "i") (* also indirectly generated by var subentry *)
; Avyayaf (fix stem "i") (* Acc *)
]
;
value build_ahan stem entry = (* stem = "ah" *)
......@@ -2531,8 +2532,8 @@ value build_ahan stem entry = (* stem = "ah" *)
]
; Bare Noun (fix stem "ar")
; Bare Noun (fix stem "as") (* before r Pan{8;2;68} *)
; Avyayaf (fix stem "am") (* pratyaham *)
; Avyayaf (fix stem "ar") (* pratyaha.h *)
(* Avyayaf (fix stem "am") NO pratyaham Acc of pratyaha *)
; Avyayaf (fix stem "ar") (* Acc pratyaha.h *)
]
;
value build_uudhan stem entry = (* stem = "uudh" *) (* Whitney §430d *)
......@@ -2619,7 +2620,7 @@ value build_neu_in stem entry =
; decline Loc "i.su"
])
]
; Bare Noun bare
; Bare Noun bare (* same as Acc *)
; Avyayaf bare
]
;
......@@ -2733,7 +2734,7 @@ value build_neu_vac stem entry =
; decline Loc "vak.su"
])
]
; Avyayaf (code "vacam")
; Avyayaf (code "vacam") (* check *)
]
;
value build_neu_ac stem entry =
......@@ -2826,7 +2827,7 @@ value build_fem_aa stem entry =
; decline Loc "aasu"
])
]
; Avyayaf (fix stem "am")
; Avyayaf (fix stem "am") (* acc of neuter stem with hrasva of vowel *)
] @ (if aa_iiv entry then [ Cvi (wrap stem 4) ] else []))
;
(* vedic g = Fem, rare (jaa) Whitney 351 *)
......@@ -2867,7 +2868,7 @@ value build_mono_aa g stem entry =
; decline Loc "aasu"
])
]
; Avyayaf (fix stem "am")
; Avyayaf (fix stem "am") (* acc of neuter stem with hrasva of vowel *)
]
;
(* gandharva Haahaa [Tirupati] and pkt raa.naa *)
......@@ -2989,13 +2990,15 @@ value build_fem_i stem trunc entry =
])
]
; Bare Noun (mirror stem)
; Avyayaf (mirror stem)
; Avyayaf (mirror stem) (* actually acc of neuter stem *)
; Indecl Tas (fix stem "tas")
] @ (if entry = "vi.mzati"
then [ Bare Noun (mirror trunc) (* vi.mzat *) ]
else []))
;
(* NB concerning Avyayaf of stems ending in long vowels. According to Pan{2,4,18}
avyayiibhaava compounds are of neuter gender, incurring hrasva of ifc stem *)
value build_fem_ii trunc entry =
let stems = [ 3 :: trunc ]
and steml = [ 4 :: trunc ] in
......
......@@ -2444,10 +2444,11 @@ value intercalates root =
]
]
;
(* Whitney§631 \& §640 intercalating i in present system 2nd class *)
value intercalate_2 = fun
[ "an#2" | "praa.n#1" | "rud#1" | "zvas#1" | "svap" | "jak.s" -> True
| _ -> False
(* Whitney§631-§640 Bandharkar II p44 augment ii in present system 2nd class *)
value augment_ii = fun (* *)
[ "an#2" | "rud#1" | "zvas#1" | "svap" | "jak.s" -> True
(* and thus "praa.n#1" too gives praa.niit *)
| _ -> False
]
;
......@@ -2496,8 +2497,8 @@ value intercalate_pp root rstem =
| "piz" | "pii.d" | "pulak" | "puuj" | "prath" | "pru.s#1" | "phal"
| "baadh" | "bha.n" | "bhas" | "bhaa.s" | "bhaas#1" | "bhuu.s"
| "bhraaj" | "ma.mh" | "manth" | "mah" | "likh" | "mil" | "mi.s"
| "miil" | "mud#1" | "mu.s#1" | "yaac" | "rac" | "ra.n" | "ras"
| "rah" | "raaj#1" | "ruc#1" | "rud#1" | "lag" | "lap" | "lal"
| "miil" | "mud#1" | "mu.s#1" | "m.rg" | "yaac" | "rac" | "ra.n"
| "ras" | "rah" | "raaj#1" | "ruc#1" | "rud#1" | "lag" | "lap" | "lal"
| "la.s" | "las" | "lu.th" | "lul" | "lok" | "loc" | "vad" | "val"
| "vas#2" | "vaaz"| "vaas#3" | "vid#1" | "vip"| "ven" | "vyath"
| "vraj" | "vra.n" | "vrii.d" | "zubh#1" | "zcut#1" | "zrath"
......@@ -2637,6 +2638,7 @@ value compute_ppp_stems entry rstem =
| ".rj" -> revcode "arj" (* strong *)
| "k.svi.d" -> revcode "k.sve.d"
| "vip" -> revcode "vep"
| "m.rg" -> revcode "marg" (* strong *)
| "jak.s" -> revcode "jagh" (* jagdha *)
| "trai" -> revcode "traa" (* glai given in -na section *)
| "k.san" -> revcode "k.sa" (* removal of final nasal *)
......@@ -2690,8 +2692,8 @@ value compute_ppp_stems entry rstem =
| _ -> passive_stem entry rstem (* possibly duhified and mirjified *)
] in [ Ta ppstem :: match entry with
[ ".rc#1" | ".rj" | "k.svi.d" | "ba.mh" | "ma.mh" | "manth"
| "yaj#1" | "vyadh" | "grah" | "vrazc" | "praz" | "zrath"
| "svap" ->
| "m.rg" | "yaj#1" | "vyadh" | "grah" | "vrazc" | "praz"
| "zrath" | "svap" ->
[ Tia ppstem ] (* avoids *ma.mhita *)
| "vaz" | "vac" | "vap" | "vap#1" | "vap#2" | "vad"
| "vas#1" | "vas#4" ->
......@@ -3542,7 +3544,7 @@ conjugations, denominative verbs and a few roots. It builds a form in -aam
suffixed by a perfect form of the auxiliairies k.r bhuu et as \Pan{3,1,35-40} *)
value peri_perf_stem entry =
let stem = match entry with
[ "iik.s" | "ii.d" | "iir" | "iih" | "uk.s" | "uc" | "ujjh" | "edh"
[ "iik.s" | "ii.d" | "iir" | "iih" | "uk.s" | "uc" | "ujjh" | "uuh" | "edh"
(* Macdonell§140a1 Whitney§1071c *)
| "ind" | "indh" | "inv" | "umbh" | "cakaas" -> entry
| "aas#2" -> "aas" (* trim *)
......@@ -3980,8 +3982,9 @@ value redup_aor weak root =
else if v = 6 then 5 (* uu \R u *)
else match root with
[ "klid" | "tvar" | "tvi.s#1" | "zri" | "grah" | "vrazc" -> 3
| "j~naa#1" | "sthaa#1" (* hidden heavy since stem in i *) -> 3
| "gaah" (* heavy exception *) -> 4
| "j~naa#1" | "sthaa#1" | "hlaad" (* hidden heavy since stem in i *)
-> 3
| "gaah" (* heavy exception *) -> 4
| _ -> if heavy || amui root then
if v=1 || v=2 || v=7 then 1 (* Whitney§860 *)
else 3 (* short \R ii, long \R i *) (* \Pan{7,4,93} *)
......@@ -4147,7 +4150,7 @@ value compute_aorist entry =
]
; match entry with (* 5. i.s aorist se.t-sic *)
[ "ak.s" | "aj" | "aas#2" | "i.s#1" | "iik.s" | "uk.s" | "uc" | "u.s"
| "uuh" | ".rc#1" | "k.rt#1" | "krand" | "kram" | "khan" | "car"
| "uuh" | ".rc#1" | "k.rt#1" | "krand" | "kram" | "k.san" | "khan" | "car"
| "ce.s.t" | "jalp" | "jaag.r" | "t.rr" | "diip" | "pa.th" | "puu#1" | "p.rc"
| "baadh" | "budh#1" | "mad#1" | "mud#1" | "muurch" | "mlecch" | "yaac"
| "ruc#1" | "lu~nc" | "luu#1" | "vad" | "vadh" | "vid#1" | "v.r#1" | "vraj"
......@@ -4198,7 +4201,7 @@ value compute_aorist entry =
}
| _ -> ()
]
; match entry with (* 7. sa aorist ksa *)
; match entry with (* 7. sa aorist ksa *)
[ "guh" | "diz#1" | "dih" | "duh#1" | "lih#1" | "viz#1" | "v.rj" -> do
(* \Pan{7,3,72-73} *)
{ compute_ath_sa_aorista weak entry
......@@ -4264,8 +4267,53 @@ value compute_injunctive entry =
}
| _ -> ()
]
}
;
; match entry with (* 5. i.s injunct *)
[ "ak.s" | "aj" | "aas#2" | "i.s#1" | "iik.s" | "uk.s" | "uc" | "u.s"
| "uuh" | ".rc#1" | "k.rt#1" | "krand" | "kram" | "k.san" | "khan" | "car"
| "ce.s.t" | "jalp" | "jaag.r" | "t.rr" | "diip" | "pa.th" | "puu#1" | "p.rc"
| "baadh" | "budh#1" | "mad#1" | "mud#1" | "muurch" | "mlecch" | "yaac"
| "ruc#1" | "lu~nc" | "luu#1" | "vad" | "vadh" | "vid#1" | "v.r#1" | "vraj"
| "z.rr" | "sidh#2" | "skhal" | "stan" | "stu" | "hi.ms" -> do
{ let stem = match weak with
[ [ 7 (* .r *) :: _ ] ->
if entry = "jaag.r" then strong (* jaagari.sam RF IC 2 p 88 *)
else long (* avaariit *)
| [ 8 (* .rr *) :: _ ] ->
if entry = "z.rr" then strong (* azariit *)
else long
| [ c :: _ ] ->
if vowel c then long
else match entry with
[ "kan" | "khan" |"car" | "mad#1" | "vad" | "skhal" -> long
| _ -> strong
]
| [] -> error_empty 24
] in
compute_ath_is_injuncta stem entry
; compute_ath_is_injunctm strong entry
}
| "gup" | "vrazc" | "zcut#1" | "sphu.t" -> (* active only *)
compute_ath_is_injuncta strong entry
| "zuu" ->
compute_ath_is_injuncta (revcode "zve") entry
| "kan" | "k.r#2"| "p.rr" -> (* active only *)
compute_ath_is_injuncta long entry
| "kamp" | "jan" | "zii#1" | "spand" -> (* middle only *)
compute_ath_is_injunctm strong entry
| "grah" -> do
{ let stem = revcode "grah" in do (* same as group above *)
{ compute_ath_is_injuncta stem entry
; compute_ath_is_injunctm stem entry
}
; let stem = revcode "grabh" in do (* supplement (ved) -- Whitney§900b *)
{ compute_ath_is_injuncta stem entry
; compute_ath_is_injunctm stem entry
}
}
| _ -> ()
]
} (* injunctives of kinds 6. and 7. missing *)
;
(* Aorist of causative *)
value compute_redup_aorista_ca stem entry =
let conjug person suff = (person,fix_augment stem suff) in
......@@ -4286,6 +4334,7 @@ value compute_aor_ca cpstem entry =
| "p.r#1" (* apiiparat *)
| "t.rr" (* atiitarat *)
| "vah#1" (* aviivahat *)
| "hlaad" (* ajihladat *)
(* | "jan" (* wrong *ajijiinat for ajiijanat *)
| "sp.rz#1" (* wrong *apii.spazat for apisp.rzat *) TODO *) ->
match cpstem with (* cpstem-ayati is the ca stem *)
......@@ -5078,7 +5127,7 @@ value compute_present_system entry rstem gana pada third =
| _ -> failwith "Anomaly Verbs"
] (* end of thematic conjugation *)
| 2 -> (* athematic conjugation: 2nd class (root class) *)
let set = intercalate_2 entry
let set = augment_ii entry
and sstem = strong_stem entry rstem
and wstem = if entry="as#1" then [ 48 ] else weak_stem entry rstem in do
{ match voices_of_gana 2 entry with
......@@ -5355,7 +5404,7 @@ value den_stem_a entry = (* in general transitive Whitney§1059c *)
| "kelaa" | "rekhaa" | "tiras" | "uras" | "payas" (* Kale§660 *)
| "vaac" (* consonant Kale§642 *)
| "dantura" (* possess *)
| "viira" | "zabda" | "tira" (* MW *) | "ma~njara" | "sraja"
| "viira" | "zabda" | "tira" (* MW *) | "ma~njara" | "sraja" | "manas"
-> rstem (* -yati *) (* standard causative meaning *)
| "madhu" | "v.r.sa" (* also madhvasyati v.r.siiyati *)
| "k.siira" | "lava.na" (* also putra *)
......@@ -5366,8 +5415,8 @@ value den_stem_a entry = (* in general transitive Whitney§1059c *)
value den_stem_m entry = (* in general intransitive or reflexive Whitney§1059c *)
let rstem = revstem entry in
match entry with
[ "artha" | "i.sa" | "kuha" | "carca" | "mantra" | "muutra" | "m.rga"
| "viira" | "safgraama" | "suutra" (* also zithila below *)
[ "artha" | "i.sa" | "kuha" | "carca" | "manas" | "mantra" | "muutra"
| "m.rga" | "viira" | "safgraama" | "suutra" (* also zithila below *)
-> rstem (* (a)-yate *)
| "asuuya" (* "asu" lengthened *) | "vyaya" (* euphony *)
-> trunc (trunc rstem)
......@@ -5409,6 +5458,7 @@ value compute_denom stem ystem entry = do (* other than present system - rare *)
[ [ 1 :: rest ] ->
match entry with
[ "asuuya" -> () (* wrong asya *)
| "m.rga" -> () (* from m.rg *)
| _ -> do (* experimental - rare acc. to Whitney *)
{ compute_passive_11 entry rest
; record_pfp_10 entry rest
......@@ -5566,7 +5616,8 @@ value compute_conjugs_stems entry (vmorph,aa) = do (* main *)
[ "paz" (* d.rz *) | "bruu" (* vac *) | "ma.mh" (* mah *)
| "ind" | "indh" | "inv" | "cakaas" | "dhii#1" | "vidh#1" -> ()
(* no perfect *)
| _ -> compute_perfect entry
| "uuh" -> () (* periphrastic *)
| _ -> compute_perfect entry
]
; (* Periphrastic Perfect *) (* .namul on demand - except gana 10 above *)
try let stem = peri_perf_stem entry in
......
......@@ -8,4 +8,4 @@
(**************************************************************************)
(* Generated by make version - see main Makefile *)
value version="3.13" and version_date="2019-02-14";
value version="3.13" and version_date="2019-02-22";
VERSION='3.13'
DATE='2019-02-14'
DATE='2019-02-22'