Repository navigation
Grammar coverage: genitive-subject kenna, fronted 'er X að finna', infinitive comma lists - #71
Merged
Merged
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes three constructions that failed to parse; more may be added to this branch as further examples turn up.
kennaregistered as an impersonal verb with a genitive subject (subject = efinVerbs.conf, besidegæta).það(nonterminalFsAtvEðaLeppur).og/eða. Comma-separated verbs are now allowed in the shared-object chain and after modal verbs, but only when a verb withog/eðacloses the list. Also fixes "Hann vill lesa, skrifa og reikna".Over-generation guard
Registering
kennaexposed a pre-existing hole inBIN_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: cleantest_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