elp(realizer): close subordinate-clause round-trip + silent-e/doubling lemmatizer + verb-final object bug + ES/PT closed-class verb guard
- realizer now carries the subordinate clause verbatim (subord_text slot): the 5th English acceptance sentence is byte-identical through parse->realize->reparse. - English -ed/-ing lemmatizer restores silent-e (loved->love) and collapses inflectional doubling (stopped->stop), inverting en_verb_past(). - parse_spec_lang: a sentence-final main verb no longer bleeds into the object slot (cstart advanced to verb+1), so intransitives round-trip. - cp_rom_is_verb rejects closed-class words (prep/det/pron/aux/neg) before the ending-only test, killing the 'para'/determiner misfires. EN telephone gate 5/5 (now byte-identical 5/5), Romance gate 6/6.
This commit is contained in:
@@ -339,6 +339,19 @@ fn realize_lang(form: [String], profile: [String]) -> String {
|
||||
let iobj: String = slots_get(form, "iobj")
|
||||
let code: String = lang_get(profile, "code")
|
||||
|
||||
// Subordinate clause tail (SACRED completeness — the clause is carried, never
|
||||
// dropped): "<conj> <subordinate surface>", e.g. "because he was a monster".
|
||||
let subord_conj: String = slots_get(form, "subord_conj")
|
||||
let subord_text: String = slots_get(form, "subord_text")
|
||||
let subord_tail: String = ""
|
||||
if !str_eq(subord_conj, "") {
|
||||
if !str_eq(subord_text, "") {
|
||||
let subord_tail = subord_conj + " " + subord_text
|
||||
} else {
|
||||
let subord_tail = subord_conj
|
||||
}
|
||||
}
|
||||
|
||||
// Negative polarity: SACRED — never dropped.
|
||||
if str_eq(polarity, "neg") {
|
||||
if str_eq(code, "en") {
|
||||
@@ -359,6 +372,7 @@ fn realize_lang(form: [String], profile: [String]) -> String {
|
||||
let parts = native_list_append(parts, iobj)
|
||||
}
|
||||
if !str_eq(location, "") { let parts = native_list_append(parts, location) }
|
||||
if !str_eq(subord_tail, "") { let parts = native_list_append(parts, subord_tail) }
|
||||
let sentence: String = str_join(parts, " ")
|
||||
return add_punct(capitalize_first(sentence), "assert")
|
||||
}
|
||||
@@ -380,6 +394,9 @@ fn realize_lang(form: [String], profile: [String]) -> String {
|
||||
if !str_eq(location, "") {
|
||||
let parts = native_list_append(parts, location)
|
||||
}
|
||||
if !str_eq(subord_tail, "") {
|
||||
let parts = native_list_append(parts, subord_tail)
|
||||
}
|
||||
let sentence: String = str_join(parts, " ")
|
||||
return add_punct(capitalize_first(sentence), "assert")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user