Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
run: |
python3 scripts/validate_sentences.py
python3 scripts/test_sentence_validator.py
python3 scripts/test_phi_readings.py
python3 scripts/test_phi_roles.py

- name: Test vocabulary schema
run: python3 scripts/test_vocabulary_schema.py
Expand Down Expand Up @@ -56,6 +58,9 @@ jobs:
- name: Check sentence-order ledger is in sync
run: python3 scripts/audit_sentence_order.py --check

- name: Check phrase-reading ledger is in sync
run: python3 scripts/audit_phrase_readings.py --check

- name: Check generated reference is in sync with vocabulary
run: |
python3 scripts/generate_reference.py
Expand Down
1 change: 1 addition & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Authority order when documents disagree: `canon.md`. Settled decisions there are
- After vocabulary changes, regenerate derived artifacts: `python3 scripts/generate_reference.py` and `python3 scripts/build_site.py`.
- After any change that touches Phi examples or citations anywhere in the corpus, regenerate the neighbor baseline with `python3 scripts/audit_phonetic_neighbors.py --output documents/validation/phonetic_neighbors_baseline.txt` and commit the file when it changes. Continuous integration diffs this baseline, and its attestation counts move whenever cited examples change, even when no word form does.
- The same changes can move the sentence-order ledger. Regenerate it with `python3 scripts/audit_sentence_order.py --output documents/validation/sentence_order_baseline.txt` and read every added line before committing: each is a sentence that parses but may have a manner word outside the Slot 1 block or an object before a prepositional phrase. Repair the ones that do; commit the ledger with the ones whose order is right.
- The same changes move the phrase-reading ledger, which records for each file how many sentences divide into phrases in more than one way, how many clauses leave a role open, and how often `shia` is contested. Regenerate it with `python3 scripts/audit_phrase_readings.py --output documents/validation/phrase_readings_baseline.txt` and commit it. The figures are measurements, not faults: a higher number in a row is something to notice, not something that blocks a commit.
- No AI attribution anywhere: no "Generated with" footers in PRs, no Co-Authored-By trailers in commits. Contributors are not singled out.
- Self-generated filenames are lowercase snake_case; `README.md`, `CLAUDE.md`, and license files are the only exceptions.
- Markdown paragraphs are single lines — never hard-wrap prose; renderers break on it.
Expand Down
1 change: 1 addition & 0 deletions documents/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ The [grammar index](grammar/) leads to the authoritative machinery references an
| [Four-syllable migration ledger](validation/four_syllable_migration.tsv) | Verified record of the completed lexical replacements. |
| [Retired forms](validation/retired_forms.txt) | Shorter forms barred from lexical reassignment without restricting productive names. |
| [Sentence validator](validation/sentence_validator.md) | Executable full-utterance grammar, diagnostic contract, commands, and known limits. |
| [Phrase-reading ledger](validation/phrase_readings_baseline.txt) | For each file: sentences that divide into phrases in more than one way, clauses with an open role, and contested uses of `shia`. |
| [Sentence-order ledger](validation/sentence_order_baseline.txt) | Every sentence that parses but may hold a manner word outside the Slot 1 block or an object before a prepositional phrase; CI compares it. |

The [project index](../project/) holds the records that govern work around these materials.
277 changes: 277 additions & 0 deletions documents/validation/phrase_readings_baseline.txt

Large diffs are not rendered by default.

48 changes: 48 additions & 0 deletions documents/validation/sentence_validator.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,54 @@ A literal `--sentence` always prints its advisories. Corpus runs print them with

The ledger mixes two kinds of line: sentences whose order is right under the reading their author meant, and sentences that still need repair. Presence in the ledger means a sentence has been seen, not that it has been cleared. Lines from `texts/` wait for the two-phase translation process before any change.

## Counting readings

The parser answers whether a sentence has a canonical parse. `scripts/phi_readings.py` asks how many it has. Phi marks the edges of embedded statements, questions, and quotations with words and leaves the commoner edges unmarked: where the subject ends and the object begins, where a prepositional phrase ends, whether a quality word before the verb is manner or object, and where an adverbial or relative clause hands over to the clause around it.

A reading is one way of dividing a clause into phrases. For each core clause the counter 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 a dependent clause could end, using the parser to decide which ends are grammatical and its own phrase rules to discard the ones that leave an undividable clause. Readings multiply across the clauses of a sentence. Each sentence inside a quotation is counted as a sentence of its own.

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

Two counts are reported. The conservative count lets a noun, pronoun, or name end a phrase anywhere and lets an adjective or verb stand as a phrase only by itself and only where nothing else can end the phrase. The full count also lets an adjective (quality noun) or a verb (event noun) head a phrase with modifiers of its own, so `mia nohero to helui.` gains "my belief changed" beside "I changed the belief".

What the figure is not:

- It is an upper bound on structural choice. The counter has no verb valency and no meanings, so `mia nosa thole.` counts "my now practices" beside "I practice now". It does not estimate how often a reader goes wrong.
- It does not count bracketing inside a phrase, the role of a clause's only bare phrase (subject or object), or which referent a pronoun picks out. The last two are where the certified texts' recorded misreadings fall, and the next section counts them.
- It follows the parser's choice for clause coordination, and a small share of sentences in the texts fall outside its clause model; the report lists them as not modelled.

```bash
python3 scripts/audit_phrase_readings.py --sentence "phao lopia shelu theo."
python3 scripts/audit_phrase_readings.py
python3 scripts/audit_phrase_readings.py --paths texts/velveteen_rabbit.md
python3 scripts/audit_phrase_readings.py --openers ha ra lo
```

The last form is a what-if. Canon lets a possessor stand before a phrase that opens with `ha` or `lo` (`lo mia lo manuwe`). `--openers` counts the readings that would remain if the listed Slot 2 words always began a new phrase.

## Open roles and third persons

`scripts/phi_roles.py` counts the two things the reading count leaves out.

An open role is a clause with one bare phrase and a verb that takes an object elsewhere. Phi marks no case and lets an established subject go unsaid, so the phrase is the subject, with nothing said about an object, or the object, with the subject unsaid. `lopia nuola.` is "the child eats" and "(it) eats the child". A relative clause has the same opening when one phrase is left inside it: in `whu mia nila miona`, the person is the one I see or the one who sees me. 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 (`mia thia nila.`), or in a command over a noun phrase (`no shelu theo.`), in a clause that has a single structural reading. A verb never witnessed that way is treated as taking no object, so the count leans low for rare verbs.

A contested third person is a `shia`, or an unsaid subject, at a point where two or more third persons are live. A third person here is the head of a clause-initial bare phrase that is a noun or a name, and it stays live for three further sentences. The tracker knows nothing of animacy or plausibility. It also counts clauses with two separate `shia`, where the listener has to tell them apart inside one clause.

Both counts are indicators of exposure. A first-person `mia nila.` is an open role by this definition and no reader stumbles on it, so the report also gives the open roles whose phrase is not `mia` or `thia`.

## The phrase-reading ledger

`documents/validation/phrase_readings_baseline.txt` holds one row per file: sentences, sentences with more than one division on each count, open roles, relative clauses with an open head, uses of `shia`, contested uses, and clauses with two `shia`. Every dictionary example is gathered into one `vocabulary/` row. CI regenerates the ledger and fails on any difference.

```bash
python3 scripts/audit_phrase_readings.py --output documents/validation/phrase_readings_baseline.txt
python3 scripts/audit_phrase_readings.py --check
```

The figures are for watching a trend, text by text. 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.

## Limits

The parser knows grammar, not the English translation beside it. It cannot decide whether an evidential claim is warranted, whether an honorific tells the truth about a relationship, or whether a source sentence has been translated faithfully.
Expand Down
2 changes: 2 additions & 0 deletions project/development_log.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ Implementation status, dependencies, optional evaluation work, and the next deve
| D129 | Accepted | Certify chapter 1 of *News from Nowhere* under the isolated translation process. | Seventy-seven aligned Phi units reconstruct all 5,214 normalized Morris characters. The source-to-Phi pass read every unit against the source and repaired 30 under D126 and D128: adjuncts moved behind explicit subjects, dependent clauses given their own tense, past narration that had lost `to` restored, manner words brought inside the Slot 1 block, `miso` used as possessor and after a preposition, the old `sui` with an event noun replaced by `whau`, and a concessive `lu` recast with `shai`. Three fresh source-blind contexts derived the complete frozen stream, and a fourth checked the 26 units of the risk queue and deterministic sample. Its findings led to five further repairs: a passive for the rope-supported bridge whose relative clause read both ways, a `tha` frame that held two sentences, `li` on a quantity, a degree particle on a preposition, and a relative clause whose tense said "had stood" for "was standing". A fifth and a sixth context derived and checked those. The Phi freezes at `b8e2ae226d10405915618993bb9584d4e5974f537d88863ef5d9f12e8a9258ff`. The chapter no longer has a line in the sentence-order ledger. Left for the vocabulary work: `we` where Morris says "again", and `phirae` where he says "the rest". |
| D130 | Accepted | Settle the small words and the clause relations, and license `tei` over a clause. | Seven maintainer rulings on 2026-11-24 answer section 4.7 and recommendation 16 of the November assessment. Each rests on a survey of every aligned text unit by its source line and on a source-blind reading test of thirty-eight invented sentences, two fresh readers per form; the sheet he ruled from is `archive/small_words_study.md`. Again receives a word (D131). Still is `tei nosa`, not yet is `tei nosa` with a negated verb, already is `phoe nosa` with `ki`, and no longer is `to te`, since readers took present `te` as a stopping in progress; `ra shemu` replaces `nosa` in a past account. Even is `we ko`, which the Slot 2 order already allowed and no text had used; bare `we` read as too every time. Instead is negation with `thona` or `whekai`, and except is `li` with the predicate turned. No relator is coined for when: `pheo` takes sequence, `whau` takes overlap and may now hold the briefer event, whenever is `lu` with `ro`, and `lu` never renders one past occasion, which both readers read as if. `tei` may stand over a clause, the one grammar extension: the clause comes first and carries its own tense, `tei` stays a preposition, and the relators stay six; the reason is the one that brought `whau`, and two of five source lines had dropped their until. At once, as soon as, soon, since, unless, even if, whether or not, only if, as if, so that, and the more the more are registered as the existing grammar says them. Canon gains four bullets, `documents/reference/small_words.md` is the registry, five fixed phrases enter the compound registry, thirteen entries, the grammar references, six manual pages, and five pages of the Adverbial Clauses pamphlet carry the rulings, and the pamphlet no longer teaches that `tei` takes no clause. The parser accepts a clause under sentence-initial `tei` and gains advisory `PHL005` for a `lu` condition whose two sentences are past with no `ro`. No text changes; `project/deferred_questions.md` lists the affected lines for one sweep after the language has settled. |
| D131 | Accepted | Coin base `ture` for again. | The reading test in D130 tried four existing devices for again (`we` before the verb, `newu` as manner, an ordinal with `shemu`, and `phirae shemu`) and none was read as again above about seventy percent; in the one source-blind chapter all three `we` lines came back as also. `ture` is an adjective: directly before the verb, inside the Slot 1 block, it is again, and before a noun it is one more of the same kind, which leaves `phirae` to mean different. The maintainer chose the form from three cleared candidates. It has no neighbour at edit distance 1 and none in the phonetic audit, is no English word, and shares its opening with `turema` (return) as audible kinship without a productive affix. Two syllables rest on the protocol's daily-round test. The gloss is `again` although the class is adjective, because a gloss line reading `repeated` would suggest many repetitions; this is a judgement call open to correction. `CV-SMALL-01` records the decision, and `CV-SMALL-07` defers other and else to the ordinary-vocabulary step. |
| D132 | Accepted | Count the structural readings of Phi sentences. | Step 1 of the November assessment's answer to its central finding (section 4.3, recommendations 3 and 6): measure the unmarked phrase boundaries before deciding whether to mark them. `scripts/phi_readings.py` extends the sentence parser to count, for every clause, the ways the words before the verb divide into subject, adjuncts, object or complement, and manner, and the places each adverbial or relative clause could end; readings multiply across a sentence's clauses, and quoted sentences count separately. It reports a conservative count, in which only nouns, pronouns, and names end a phrase freely, and a full count that also lets an event or quality noun head a phrase with its own modifiers. `scripts/audit_phrase_readings.py` runs it over the lexicon's examples and the active Markdown and can show one sentence's divisions; `--openers` is a what-if that treats the listed Slot 2 words as always opening a phrase. The counter has no verb valency or meanings, so the figure is an upper bound on structural choice and not a comprehension rate, and it does not see the role of a single bare phrase or pronoun reference, which is where the two verified misreadings in certified text fall. First measurement on 2026-11-24: 42 percent of sentences in the translations have more than one division on the conservative count and 66 percent on the full count; the primer has 22 and 34 percent. Treating `ha`, `ra`, and `lo` as phrase openers lowers the translations' conservative figure to 35 percent. About one adverbial clause in five and one relative clause in five has more than one grammatical end. No language rule changes. |
| D133 | Accepted | Count open roles and contested third persons, and track all three figures. | Two maintainer rulings on 2026-11-24 after the first reading count: measure roles and reference next, and track the figure. The reading count does not see the two kinds of misreading verified in certified text, a single bare phrase taken as object where subject was meant and a `shia` assigned to the wrong referent. `scripts/phi_roles.py` counts both exposures. An open role is a clause, or a relative clause, with one bare phrase and a verb that takes an object elsewhere; the lexicon has no valency field, so a verb counts as taking an object when the corpus shows it 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 (154 verbs on first measurement). A contested third person is a `shia` or an unsaid subject while two or more third persons are live, a third person being the noun or name heading a clause-initial bare phrase within the last three sentences; clauses with two separate `shia` are counted too. First measurement: in the translations 5 percent of clauses have an open role (197, of which 124 are not `mia` or `thia`), a third of the 1,102 uses of `shia` are contested, and 38 clauses hold two `shia`, 25 of them in *The Velveteen Rabbit*; both verified misreadings fall in clauses the counts flag. `documents/validation/phrase_readings_baseline.txt` records one row per file for all three measures, CI checks it, and the working rules name the regeneration command. The figures use no meanings and are upper bounds on exposure; a corpus-derived valency is a stopgap for the valency field the assessment recommends. No language rule changes. |

## Completed discretionary lexical migrations

Expand Down
1 change: 1 addition & 0 deletions project/handoff/repository_workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ python3 scripts/validate_sentences.py --paths texts/example.md
python3 scripts/validate_sentences.py --docs
python3 scripts/validate_sentences.py --paths texts/example.md --lint
python3 scripts/audit_sentence_order.py --output documents/validation/sentence_order_baseline.txt
python3 scripts/audit_phrase_readings.py --output documents/validation/phrase_readings_baseline.txt
```

The full active Markdown scan remains a migration command because the evaluation corpus predates the parser. As of D113, `--docs` parses 5,532 complete examples and reports two diagnostics in `documents/evaluation/narrative_test_corpus.md`: PHS103 at line 46 and PHS115 at line 212. Triage each as parser or corpus before editing it. The parser's boundary and diagnostic contract are in `documents/validation/sentence_validator.md`.
Expand Down
Loading
Loading