Skip to content

Grammar coverage: gapped relatives, inverted dative subjects, -andi agent nouns - #72

Merged
vthorsteinsson merged 3 commits into
masterfrom
grammar-coverage-3
Oct 23, 2026
Merged

vthorsteinsson merged 3 commits into
masterfrom
grammar-coverage-3

Conversation

@vthorsteinsson

Copy link
Copy Markdown
Member

Two commits of grammar and disambiguation work (plus a merge of master for the dependabot bumps). All 177 tests pass locally; ruff and mypy are clean.

5db0724: gapped infinitive relatives, inverted dative subjects, -andi nouns

  • "kerfis sem til stendur að innleiða": object of an infinitive gapped after impersonal til stendur / stendur til (SetningAukafallÁnF).
  • "kerfinu sem við ætlum að innleiða": new SagnRunaStýfðNh covers ætla/reyna að, þurfa/eiga/verða að, hyggjast/vilja/munu, perfect ("hefur ákveðið að") and progressive ("var að"). The score is +14, so nf/þf-ambiguous NPs are read as the subject and the infinitive stays inside the relative clause.
  • "Þar sem … var úrskurðarnefndinni óheimilt að …": inverted dative subject with an adjective (LoÞgfNh) after a fronted element. New SögnMeðF_0 alternative, the counterpart of BeygingarliðurLoÞgf.
  • -andi agent nouns (kvartandi, kærandi, nemandi, þolandi, …) lost to the present participle reading as subjects, because the reducer gives LHNT terminals +12. A sweep of all 422 BÍN forms that are both a kk -andi noun and LHNT found 303 failures. Prefs.conf now demotes the participle (<<<) for 46 clear agent/role nouns. eigandi, notandi and frambjóðandi go from << to <<<. Words with a real adjective use (lesandi, mælandi, …) demote only so. Participle-dominant words (lifandi, komandi, ráðandi, …) are left alone, and so is svarandi ("svarandi til").
  • þolandi is preferred as kk over the rare kvk noun, and hafði as the verb over the weak form of the adjective hafður.

d7534b5: object-gapped and stranded-preposition relatives

  • "bókin sem hann skrifaði": new SagnRunaStýfðAndlag (subject + transitive verb, object gapped). This replaces OVS misreadings ("sem [hann] skrifaði") and intransitive readings that lost the object frame.
  • "málið sem nefndin fjallaði um": new SagnRunaStýfðFs. The stranded preposition is shown as ADVP ao, as already done for impersonal passives. New TengisetningÞolStrönduðFs handles impersonal passives with a stranded preposition in all word orders.
  • simpletree.py: StrönduðFs → ADVP, NlAndlagStrönduðFs → NP-OBJ (tagged keep so the grammar compiler does not shortcut it), TengisetningÞolStrönduðFs → IP.

Worth a look when reviewing

  • test_relative_clause now expects a different tree for "Þetta eru lausnirnar sem kallað hefur verið eftir". The old expectations read kallað as a predicate adjective.
  • With <<<, "Ástandið er ekki þolandi" reads þolandi as a noun. This is accepted because the noun is far more frequent.
  • Known gaps: vera + stranded preposition ("húsið sem hann hefur verið í") and multi-word stranded prepositions ("sem hún tók á móti").
  • Heavy parse tests are about 5% slower (112 s to 118 s for the full suite here).

🤖 Generated with Claude Code

vthorsteinsson and others added 3 commits October 23, 2026 11:13
Constructions that failed to parse or got the wrong tree:

- "kerfis sem til stendur að innleiða á næsta ári": relative clauses
  whose gap is the object of an infinitive after impersonal 'til
  stendur' / 'stendur til' (new alternatives in SetningAukafallÁnF).

- "kerfinu sem við ætlum að innleiða": relative clauses with a subject,
  a verb taking an infinitive and the infinitive's object gapped. New
  nonterminal SagnRunaStýfðNh under SagnRunaStýfð covers control verbs
  with 'að' (ætla, reyna), þurfa/eiga/verða að, bare-infinitive modals
  (hyggjast, vilja, munu) and the perfect ("hefur ákveðið að"). It gets
  a +10 score so that an nf/þf-ambiguous noun phrase is read as the
  subject rather than a fronted object with a gapped subject.

- "Þar sem kvartandi hefði ekki haft aðild var úrskurðarnefndinni
  óheimilt að taka málið til efnismeðferðar": a dative subject with an
  adjective (óheimilt, ljóst, frjálst, ...) after the verb when
  something else is fronted. New SögnMeðF_0 alternative, the inverted
  counterpart of BeygingarliðurLoÞgf.

- Agent nouns in -andi ('kvartandi', 'kærandi', 'nemandi', ...) lost to
  the present participle reading as subjects, since the reducer gives
  LHNT terminals +12. A sweep of the 422 BÍN forms that are both a kk
  -andi noun and a participle found 303 such losses; Prefs.conf now
  demotes the participle (<<<) for 46 clear agent/role nouns, and the
  existing eigandi/notandi/frambjóðandi entries are raised from << to
  <<<. Words with a real predicative adjective use (lesandi, mælandi,
  ...) demote only the participle; 'gerandi' and 'þolandi' prefer the
  noun also as a predicate. Participle-dominant words (lifandi,
  komandi, ráðandi, ...) are deliberately left alone, as is 'svarandi'
  ("svarandi til").

- 'þolandi' is masculine, not the rare feminine noun (noun preference),
  and 'hafði' is the verb, not the weak form of the adjective 'hafður'.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- "bókin sem hann skrifaði": a subject and a transitive verb whose
  object is the gap. These were parsed with the subject as a fronted
  object ("sem [hann] skrifaði" = OVS) or with the verb read
  intransitively, losing its object frame. New SagnRunaStýfðAndlag
  (+10) covers finite and perfect verbs with an oblique object.

- "málið sem nefndin fjallaði um": the gap is the object of a
  preposition, which is left stranded. New SagnRunaStýfðFs (+14) covers
  finite, perfect, infinitive (ætla/þurfa að, modals, progressive 'vera
  að') and verb + object ("staðurinn sem ég sagði þér frá"). The
  stranded preposition is shown as ADVP ao, as already done for
  impersonal passives ("kallað var eftir"). The object wrapper
  NlAndlagStrönduðFs is tagged 'keep' so that the grammar compiler does
  not shortcut it away and lose its NP-OBJ label.

- New TengisetningÞolStrönduðFs for the impersonal passive with a
  stranded preposition in all word orders ("kallað var/verður eftir",
  "var kallað eftir", "kallað hefur verið eftir", "hefur verið kallað
  eftir"); without it the new rules read 'kallað' as a subject. The
  expected tree in test_relative_clause changes accordingly: it used to
  read 'kallað' as a predicative adjective.

- SagnRunaStýfðNh is raised from +10 to +14 so that an infinitive stays
  inside the relative clause ("(ég gleymdi bókinni) sem ég ætlaði að
  lesa"), and gets the progressive "sem ég var að lesa".

Known gaps: 'vera' + stranded preposition ("húsið sem hann hefur verið
í") and multi-word stranded prepositions ("sem hún tók á móti").

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vthorsteinsson
vthorsteinsson merged commit ca6464f into master Oct 23, 2026
8 checks passed
@vthorsteinsson
vthorsteinsson deleted the grammar-coverage-3 branch October 23, 2026 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant