Skip to content

Grammar coverage: genitive-subject kenna, fronted 'er X að finna', infinitive comma lists - #71

Merged
vthorsteinsson merged 1 commit into
masterfrom
grammar-coverage-2
Sep 21, 2026
Merged

vthorsteinsson merged 1 commit into
masterfrom
grammar-coverage-2

Conversation

@vthorsteinsson

Copy link
Copy Markdown
Member

Summary

Fixes three constructions that failed to parse; more may be added to this branch as further examples turn up.

  • "Í Paradísarskjölunum kennir ýmissa grasa" — kenna registered as an impersonal verb with a genitive subject (subject = ef in Verbs.conf, beside gæta).
  • "Þar af leiðandi er tiltölulega fáa Íslendinga að finna í skjölunum" — the "X_þf er að finna" rule only allowed the object first. New variant with a fronted adverbial / PP / expletive það (nonterminal FsAtvEðaLeppur).
  • "… hæfni til að skilja, nota, meta, ígrunda og ástunda lestur texta" — infinitives could share an object only when joined by og/eða. Comma-separated verbs are now allowed in the shared-object chain and after modal verbs, but only when a verb with og/eða closes the list. Also fixes "Hann vill lesa, skrifa og reikna".

Over-generation guard

Registering kenna exposed a pre-existing hole in BIN_Parser.verb_matches: a genitive subject was combined with the verb's ordinary object frames, admitting e.g. *Í bókinni gætir Páls misskilning / *kennir Páls grös. Genitive-subject impersonals never take an object now. Verified before/after that only those bogus parses disappear.

Negative cases covered by tests: comma lists without a closing conjunction, wrong case/number/verb in the "að finna" construction, wrong subject case for kenna.

Testing

  • uv run pytest: 165 passed (3 new tests)
  • uv run ruff check src/reynir, uv run mypy src/reynir: clean
  • Heavy parse tests (test_long_parse, test_complex, test_consistency, test_parse) run ~1.5% slower with the new rules.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Dbj8bT51itpXbsxLjfLuce

…ma lists

Three constructions that failed to parse:

- "Í Paradísarskjölunum kennir ýmissa grasa": register 'kenna' as an
  impersonal verb with a genitive subject (subject = ef in Verbs.conf).
  While at it, close a pre-existing hole in BIN_Parser.verb_matches:
  a genitive subject was combined with the verb's ordinary object
  frames, admitting e.g. "*Í bókinni gætir Páls misskilning".
  Genitive-subject impersonals are intransitive idioms.

- "Þar af leiðandi er tiltölulega fáa Íslendinga að finna í skjölunum":
  the "X_þf er að finna" rule only allowed the object in first
  position. Add a variant with a fronted adverbial, prepositional
  phrase or expletive 'það' (new nonterminal FsAtvEðaLeppur).

- "... hæfni til að skilja, nota, meta, ígrunda og ástunda lestur
  texta": infinitives could share an object only when joined by
  og/eða. Allow comma-separated verbs in the shared-object chain
  (OgNhSögn_*) and after modal verbs (OgSögn_nh, Sögn_1_nh), but only
  when a verb with og/eða closes the list. Also fixes "Hann vill lesa,
  skrifa og reikna".

Heavy parse tests run ~1.5% slower with the new rules.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Dbj8bT51itpXbsxLjfLuce
@vthorsteinsson
vthorsteinsson merged commit 3c7d88d into master Sep 21, 2026
8 checks passed
@vthorsteinsson
vthorsteinsson deleted the grammar-coverage-2 branch September 21, 2026 18:34
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