I wish that ...
... her only wish was ...
You get three wishes ...
We wish you a merry ...
S → NP VP VP → V NP NP → Det N | Pron Det → "a" Pron → "I" N → "wish" V → "wish"
"a" article "Usually, verbs "wish" don't follow articles" noun singular verb present verb infinitive
REMOVE verb IF (-1 det) ; SELECT verb IF (-1 det) ;
“La casa grande”
"<la>" "el" det def f sg "lo" prn p3 f sg "<casa>" "casa" n f sg "casar" v pri p3 sg "<grande>" "grande" adj mf sg
REMOVE v IF (-1 det) ; REMOVE n IF (-1 prn) ;
Analyses = variables
Rules = clauses
REMOVE v IF (-1 det) |
laDet ⇒ ¬casaV |
Disambiguation = model
Disambiguation = model
We can use SAT-solver as a CG-engine!
Rules apply in parallel
Two schemes to solve conflicts
Rules disambiguate more
REMOVE v IF (-1 det)
may remove det
Careful context irrelevant
REMOVE v IF (-1C det)
High-quality CGs have 1000s of rules
Conflicting rules, ineffective rule order
➡ Need automated grammar analysis!
No conflict: There is a sequence where r can remove something, after q.
q = REMOVE verb IF ( 1 noun) ; r = REMOVE verb IF (-1 noun) ; "<w1>" "<w2>" "<w3>" "w1" det def "w2" noun sg "w3" verb sg "w1" verb pl "w3" noun pl
Conflict: No such sequence can be constructed.
Can we generate sequences?
Apply rules to a symbolic sentence
"<w1>" "<w2>" "<w3>" "w1" det def "w2" det def "w3" det def "w1" noun sg "w2" noun sg "w3" noun sg "w1" noun pl "w2" noun pl "w3" noun pl "w1" verb sg "w2" verb sg "w3" verb sg "w1" verb pl "w2" verb pl "w3" verb pl
Model state after each rule application
REMOVE verb IF (-1 det) ;
"<w1>" "<w2>" "<w3>" "w1" det def "w2" det def "w3" det def "w1" noun sg "w2" noun sg "w3" noun sg "w1" noun pl "w2" noun pl "w3" noun pl "w1" verb sg "w2" verb sg "w3" verb sg "w1" verb pl "w2" verb pl "w3" verb pl
SAT-problem becomes “Which readings were originally true”
Tried it with 3 grammars: Dutch, Spanish, Finnish
Finds conflicts in all
Running time: seconds to hours
"Why don't we just use corpus" vs. "Why don't you just test your program"
Language technology + Software verification = <3