Download presentation
Presentation is loading. Please wait.
1
Constraint Grammar ESSLLI
Friday: What you can do with Constraint Grammar
2
CG Input remember CG is modular!
output from one module becomes input to the next module pre- processor analyzer nomorph CG your CG text output cat file | preprocessor | analyzer | vislcg3 -g engcg.nomorph.cg | vislcg3 -g yourcgfile ... echo ”text” | preprocessor | analyzer | vislcg3 -g engcg.nomorph.cg | vislcg3 -g yourcgfile ...
3
CG Applications Corpus enrichment
adding ”searchables”, i.e. markup of implicit information for explicit searches definite/indefinite noun phrases complex tenses, aspect secondary nexus relations ###### definite np ### LIST DEF-EDGE = "the" ("each" DET) ("every" DET) ("all" DET) GEN <poss> (<dem> DET) NUM ; # SUBSTITUTE (N) (<def> N) TARGET (N NOM) (*-1 DEF-EDGE BARRIER NON-PRE-N/ADV) ; SUBSTITUTE (N) (<def> N) TARGET (N NOM) (c DEF-EDGE) ; ###### complex tense ### SUBSTITUTE (V) (<fut> V) TARGET (p VV LINK 0 ("will") OR ("shall")) ;
4
CG Applications Text markup for Information Extraction / Retrieval
Named Entity Recognition (NER) for news feed filtering Time & Place contextualisation of events Sentiment marking Sect members won political control of the nearby community of Antelope, renaming it City of Rajneesh, and attempted to control voting in Wasco County by busing thousands of homeless people to the commune in 1984. ADD (%LOC) TARGET (*-1 PRP LINK 0 ("in") LINK 0 OR ; # Place: in ADD (%LOC-TMP) TARGET (-1 ("in" PRP)) ; # time: in 1998
5
CG Applications Anaphora / referent resolution
pronoun resolution for Machine Translation (MT) reflexive vs. non-reflexive NP anaphora: synonyms, variation (matching of semantic class) syntactic links: @FS- N< The Mediterraneans occupy the center of the stage. Alexander Militarev suggests that their homeland was in the Levant. Specifically, he identifies them with the Natufian culture. SETRELATION (ref) TARGET ("he") (0 (NOM) OR (ACC)) TO (**-1WA + N-HUM LINK 0 (S) LINK NOT 0 <fem> LINK NEGATE BARRIER VFIN OR ;
6
CG Applications Grammar checking (ORDRET: Danish, LingvoHelpilo: Esperanto) better ordering of spelling correction alternatives, using contextual tests can be done by running an existing CG disambiguator grammar on the output of a spellchecker mapping of grammatical error types agreement errors, even long-distance (subject complements, relative clauses verb chain inflexion erros reordering of constituents (untried!) rules can be named --> pedagogical comments on error types I think he definitely prefer another day. ADD (§3S) TARGET (V -3S) OR (INF) OR (IMP) (*-1C (S NOM) OR (3S NOM) BARRIER NON-ADV LINK *-1 VV OR CLB OR >>> BARRIER (KC) LINK NOT 0 (<xt>)) ;
7
CG Applications Machine Translation (MT)
Indirect: e.g. add person / number on English verbs for translations into Romance og Slavic language They shared a common vision. The board member shared a common vision. He and Peter shared a common vision. LIST PN = 1S 2S 3S 1P 2P 3P ; SUBSTITUTE (-3S) $$PN TARGET VFIN (c LINK cS $$PN) ; # unification generalisation SUBSTITUTE (IMPF) (IMPF) + $$PN TARGET VFIN (c LINK cS $$PN) ; # unificationgeneralisation
8
CG Applications Machine Translation (MT) Direct mapping translations
handling polysemy or usage distinctions The new board members shared a common vision - promising that share holders would get their share of the year's earnings ADD (§DE-TRANSLATION:Aktien-) TARGET ("share" N ; # share holder, share price or with dep-relations: ADD (§TRANSLATION:Aktien-) TARGET ("share" N NOM) (p N) ; ADD (§DE-TRANSLATION:Anteil) TARGET ("share" N S) (-1 (<poss>)) ; # get one's share
9
CG Applications Machine Translation (MT)
Reordering: moving dependency tree sections SVO --> SOV ADJ N --> N ADJ SUB, S, ADV, V -> SUB, S, V, ADV The new board members shared a common vision MOVE WITHCHILD (*) TARGET BEFORE NOCHILD (p &MV) ; The new board members a common vision shared
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.