morphology.mli 2.88 KB
Newer Older
huet's avatar
huet committed
1 2 3 4 5 6
(**************************************************************************)
(*                                                                        *)
(*                     The Sanskrit Heritage Platform                     *)
(*                                                                        *)
(*                              Gérard Huet                               *)
(*                                                                        *)
Gérard Huet's avatar
Gérard Huet committed
7
(* ©2018 Institut National de Recherche en Informatique et en Automatique *)
huet's avatar
huet committed
8 9 10 11
(**************************************************************************)

(* Morphology interface *)

12 13
(* Used by [Inflected] for inflective morphology generation, 
   and by [Morpho] for further treatment *)
huet's avatar
huet committed
14 15 16 17 18

open Skt_morph;

(* module Morphology : sig *)

19
type inflexion_tag = (* vibhakti *)
huet's avatar
huet committed
20 21
  [ Noun_form of gender and number and case             (* declined nominal *)
  | Part_form of verbal and gender and number and case  (* declined participle *)
22
  | Bare_stem    (* iic forms *)
huet's avatar
huet committed
23 24 25
  | 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 *)
26 27
  | Ind_form of ind_kind                 (* indeclinable forms: prep, adv, etc *)
  | Ind_verb of modal                    (* indeclinable inf abs-ya and perpft *)
huet's avatar
huet committed
28 29 30 31
  | Abs_root of conjugation              (* abs-tvaa *)
  | Auxi_form                            (* verbal auxiliaries forms *)
  | Unanalysed (* un-analysable segments *)
  | PV of list string (* Preverb sequences *)
32 33
  (* NB preverb sequences are collated separately by [Roots] module, and they do not 
     appear in solutions, removed by compression of [Dispatcher.validate]. *)
huet's avatar
huet committed
34 35 36 37 38 39 40
  ]
and inflexions = list inflexion_tag
;
type inflected_map = Lexmap.lexmap inflexions
and lemma = Lexmap.inverse inflexions
and lemmas = list lemma
;
41 42
type unitag = (Word.delta * inflexions)
and multitag = list unitag
huet's avatar
huet committed
43 44
;
type morphology = 
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
  { 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 
huet's avatar
huet committed
64
  ; auxiicks : inflected_map 
65 66 67 68 69 70 71 72 73 74 75
  ; 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
huet's avatar
huet committed
76 77 78 79 80
  }
;

(* end; *)