@goodmami @Dan
I have obtained some understanding recently, and I would use the number 297 as an example to illustrate my understanding. Could you see if my understanding is correct? (I’m using ERG-2025 and I have checked that LKB can map OOV numerals with this grammar, but somehow the identification of proper nouns seems to be stricter than ERG-2018)
- ACE first uses
rpp/tokenizer.rpp to tokenize/pre-process the text, and 297 becomes a token (other .rpps seem unrelated to plain numbers);
- The token-mapping files particularly for numbers are in
tmr/ne?.tdl. 297 is captured by card_ne_2_tmr in ne2.tdl to get the features [ +CLASS card_ne, +ONSET c-onset ] .
- In
gle.tdl, generic_card_ne identifies [ +CLASS card_ne, +ONSET c-onset ] and gives 297 a lexical type aj_-_i-crd-gen_le.
Besides, by the ordering in english.tdl:
;;
;; Lexical rules
;;
:include "lexrules".
;; Dependency annotation support for rule types
;;:include "dts".
;; Delimiters (strong and weak brackets)
:include "delims".
:include "auxverbs".
:include "letypes".
:end :type.
;;
;; Lexicon entries (instances of status lex-entry or generic-lex-entry)
;;
:begin :instance :status lex-entry.
:include "lexicon".
:include "lexicon-rbst".
:include "ple".
:end :instance.
:begin :instance :status generic-lex-entry.
:include "gle".
:include "gle-gen".
:end :instance.
It looks like gle.tdl might be executed after all the lexical types.
In particular, I’m not sure whether the understanding of ordering is correct here; we know that HPSG calculates at the speed of math, but what about file inclusion and preprocessing?
Given this understanding, I want to discuss the subtleties involved in enabling token-mapping of numerals and tokens containing numerals in Kalaallisut. I pick a real example from [1] to present what challenges there are:
14-iniit 18-inut 19-inulluunniit
14-niit 18-nut 19-nut=luunniit
14-PL.ABL 18-PL.ALL 19-PL.ALL=or.CONJ
“from 14 to 18 or 19”
In reality, the token-mapping rules should tackle the second line. I have written a Python script to go from the first line to the second. The questions are:
- 14, 18 and 19 are actually base morphemes, and -niit, -nut are case inflections. How to ensure that token-mapping will map only 14 but not 14-niit to a lexical type that can take further lexical rules? I see the following type in
lfr.tdl, and I assume that lexical filtering will take place between token-mapping and lexical rule applications, but I’m not sure whether it is related to this case:
;; DPF 2018-04-09 - Special case rules for numerals, since they are no longer
;; unk-onset (in order to get |*a 11-year stay|
numeral_right_punct_lfr := lexical_filtering_rule &
[ +CONTEXT < >,
+INPUT < [ ORTH [ CLASS card_or_dom_or_year_or_time_ne,
FORM ^[0-9.,]+[])}”",;\.!?-]$ ],
SYNSEM [ PUNCT.RPUNCT no_punct ] ] >,
+OUTPUT < > ].
- Is it possible to set up a pipeline from a Python script as a morphological analyzer (currently it provides morpheme segmentations without POS tags) to LKB as a syntactic parser? Or should I go for ACE in this case? I just find the visualizations in LKB quite helpful to me. A potential complication is that one original sentence may have multiple distinct morpheme segmentations.
Reference:
[1] Berthelsen, C. (1996). Kalaallisut Sungiusaatit. Atuakkiorfik Ilinniusiorfik.