Skip to content

Measure readings, open roles, and contested pronouns - #729

Merged
dcellison merged 2 commits into
mainfrom
count_phrase_readings
Nov 24, 2026
Merged

dcellison merged 2 commits into
mainfrom
count_phrase_readings

Conversation

@dcellison

@dcellison dcellison commented Nov 24, 2026 •

Copy link
Copy Markdown
Owner

Summary

The sentence parser answers one question: does this sentence have a canonical parse? The November assessment's central finding (section 4.3) is that many sentences have several, because Phi marks where an embedded statement, question, or quotation ends and leaves the more frequent phrase edges unmarked. Its first recommended step was to measure that before deciding anything.

This pull request adds the instruments and a tracked ledger. It changes no language rule and no text.

It measures three things: how many ways a sentence divides into phrases, how many clauses leave a role open, and how often shia has more than one third person to choose from.

1. Readings

For each clause, scripts/phi_readings.py takes the words before the Slot 1 stack (or before the verb when there is no stack) and enumerates every division that canon's order allows: subject, adjuncts, object or complement, then manner. It adds every place an adverbial or relative clause could end. Readings multiply across the clauses of a sentence, and each sentence inside a quotation counts as a sentence of its own.

phao lopia shelu theo. has three readings: the parent reads the child's book, the parent's child reads the book, and one phrase with nobody named as reader. mia shia wiru ma nila. has one, because a pronoun begins its phrase.

The conservative count lets only a noun, pronoun, or name end a phrase freely. The full count also lets an event noun or a quality noun head a phrase with its own modifiers, so mia nohero to helui. gains "my belief changed" beside "I changed the belief".

Corpus Sentences More than one reading Full count
Translations 2,799 42% 66%
Original compositions 449 45% 73%
Manual 889 35% 49%
Pamphlets 542 25% 31%
Primer 572 22% 34%
Dictionary examples 1,464 42% 64%

In the texts, one sentence in five has a noun or a name directly beside a noun with the phrase edge open between them. About one adverbial clause in five and one relative clause in five has more than one grammatical end. Treating ha, ra, and lo as words that always open a new phrase (the --openers what-if) lowers the translations' conservative figure from 42% to 35%.

2. Open roles

The reading count cannot see a clause like lo phirae tupiwa so ma nila, which has one phrase and one division. The phrase is still either the subject or the object of nila, and a source-blind reader of the certified Velveteen Rabbit took it as the object where the translator meant the subject.

scripts/phi_roles.py counts these. An open role is a clause with one bare phrase and a verb that takes an object elsewhere. A relative clause has the same opening when one phrase is left inside it. A passive, a command, or a second bare phrase settles the role.

The lexicon records no valency, so the corpus supplies it. A verb counts as taking an object when it appears at least once in the passive, with two bare phrases that cannot be read as one, or in a command over a noun phrase, in a clause with a single structural reading. That gives 154 verbs.

Corpus Clauses Open role Of which not mia or thia
Translations 3,793 197 (5%) 124
Manual 944 100 (11%) 17
Pamphlets 523 49 (9%) 11
Primer 504 13 (3%) 11

The verbs found most often with an open role are haolu, theo, nila, and shelomu.

3. Third persons

Phi has one third-person pronoun. The tracker follows which third persons are live (the noun or name heading a clause-initial bare phrase, for three further sentences) and counts each shia that has two or more to choose from. It also counts clauses with two separate shia, and unsaid subjects.

Corpus Uses of shia With two or more live Clauses with two shia
Translations 1,102 364 (33%) 38
Original compositions 48 39 (81%) 0
Manual 109 15 (14%) 0

Twenty-five of the 38 two-shia clauses are in The Velveteen Rabbit. One of them is the second misreading the assessment verified, shia roa shia to pa rato.

What the figures are not

  • Each is an upper bound on what the grammar leaves open. Nothing here uses meanings, so mia nosa thole. counts "my now practices" beside "I practice now", and a first-person mia nila. counts as an open role that no reader stumbles on. None of the figures is a rate of misunderstanding.
  • The reading count does not look at bracketing inside a phrase, and it follows the parser's choice for clause coordination. About 1% of sentences in the translations fall outside its clause model and are reported as not modelled.
  • The corpus-derived valency is a stopgap. A verb never witnessed with an object is treated as taking none, so the role count leans low for rare verbs.
  • The third-person tracker knows nothing of animacy or plausibility.

The ledger

documents/validation/phrase_readings_baseline.txt holds one row per file with all three measures, and every dictionary example under one vocabulary/ row. CI regenerates it and fails on a difference. CLAUDE.md gains the regeneration command beside the two existing ledgers, with a note that these numbers are measurements and a higher one blocks nothing.

A row usually changes only when its file does. The open-role columns can also move when another file adds the first witness that a verb takes an object.

Files

  • scripts/phi_readings.py: the reading counter, a subclass of the parser that reuses its legality checks.
  • scripts/phi_roles.py: object-taking verbs from the corpus, open roles, and the third-person tracker.
  • scripts/audit_phrase_readings.py: the report, a single-sentence view (--sentence), the what-if (--openers), and the ledger (--output, --check).
  • scripts/test_phi_readings.py and scripts/test_phi_roles.py: twenty-five tests, run in CI.
  • documents/validation/phrase_readings_baseline.txt: the ledger.
  • documents/validation/sentence_validator.md, scripts/README.md, documents/README.md, project/handoff/repository_workflow.md, CLAUDE.md: the models, their limits, and the commands.
  • project/development_log.md: D132 and D133.

Judgement calls to check

  • A bare time adjunct is recognized by gloss (now, moment, day, the stations of the day, the seasons). The parser's own temporal set is every noun with a temporal domain, which includes child, elder, and seed.
  • Canon's ruling on mia lohau nai is applied: before nai or kelu, a clause-initial pronoun is not counted as the owner of the complement alone.
  • With ka, three bare phrases are allowed (causer, causee, object). Otherwise the limit is two.
  • Valency comes from the corpus. The assessment recommends a valency field in the lexicon; nothing here adds one.
  • A third person stays live for three sentences. The window is a guess and is one constant to change.
  • Where a dependent clause has more than one possible end, roles are not counted in that sentence.
  • CLAUDE.md is edited to add the regeneration rule.

Voice and Humanizer pass

The pass covered the commit messages and this description. The validator notes and log entries are internal records. One change came out of the read-through: the summary had a sentence narrating which measure was added when, which described the history of the pull request instead of its content. It now says what the three measures are.

Checks

  • python3 scripts/test_phi_readings.py and python3 scripts/test_phi_roles.py: 25 tests, OK
  • python3 scripts/test_sentence_validator.py: OK
  • python3 scripts/validate_examples.py: 0 errors, 0 warnings
  • python3 scripts/validate_sentences.py: 3374 examples, 0 errors
  • python3 scripts/audit_phrase_readings.py --check and python3 scripts/audit_sentence_order.py --check: current
  • The neighbor baseline is unchanged; python3 scripts/build_site.py builds

The sentence parser says whether a sentence has a canonical parse. The
November assessment's central finding is that many sentences have
several, because Phi marks the edges of embedded clauses and leaves the
commoner phrase edges unmarked. This adds the instrument to measure
that before anything is decided about marking them.

`phi_readings.py` counts, for each clause, the ways the words before
the verb divide into subject, adjuncts, object, and manner, and the
places each adverbial or relative clause could end.
`audit_phrase_readings.py` runs it over the lexicon's examples and the
active Markdown, or shows one sentence's divisions.

The count has no verb valency and no meanings. It is an upper bound on
structural choice, and the validator notes say what it leaves out. No
baseline is committed and no language rule changes. D132 records the
first measurement.
The reading count cannot see the two kinds of misreading verified in
certified text: a lone bare phrase taken as object where subject was
meant, and a `shia` given to the wrong referent. The maintainer asked
for both to be measured and for the figures to be tracked.

`phi_roles.py` counts clauses whose one bare phrase may be subject or
object, and uses of `shia` while two or more third persons are live.
The lexicon has no valency field, so a verb counts as taking an object
when the corpus shows it in the passive, with two separate bare
phrases, or in a command over a noun phrase.

`documents/validation/phrase_readings_baseline.txt` now records all
three measures with one row per file. CI checks it, and the working
rules name the command that regenerates it. D133 records the first
measurement.
@dcellison dcellison changed the title Count the structural readings of Phi sentences Measure readings, open roles, and contested pronouns Nov 24, 2026
@dcellison
dcellison merged commit 6a62935 into main Nov 24, 2026
1 check passed
@dcellison
dcellison deleted the count_phrase_readings branch November 24, 2026 22:31
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.

2 participants