Repository navigation
Closed
Description
Unit
SCRIP-MORPH-002
Why
M1 still lacks the POS metric family. SCRIP-MORPH-001 pinned the pylem/AOT runtime contract but deliberately did not choose hidden FantLab disambiguation rules or pretend that the public pylem N collision can distinguish noun from cardinal numerals.
Current FantLab /lp pages describe POS bigrams as ordered POS pairs reported per 1000 text words and sentence-position cells as the probability that a POS occupies a numbered word position in a randomly selected sentence. That wording is enough to freeze explicit Scriptorium candidate denominators, but not enough to claim parity.
Scope
- Add a deterministic, provider-neutral
scriptorium-pos-v1metric core consuming one sequence of pylem-style runtime POS candidates per Scriptorium word token. - Resolve a token only when every supplied analysis is directly mapped by
aot-pylem-0.0.18-to-fantlab-2022-v1and all mapped analyses agree on one FantLab bucket. - Treat no-analysis tokens, runtime
N, unresolved extra runtime categories, unknown codes, and cross-bucket homonyms as undefined rather than guessing a winner. - Emit defined/undefined counts and percentages plus all 17 displayed FantLab bucket counts and
% of definedvalues. - Emit sentence-bounded ordered POS bigrams for directly resolved adjacent word tokens, normalized per 1000 total Scriptorium word tokens. An unresolved token breaks the candidate pair; sentence boundaries never create a pair.
- Emit positions 1..20 as bucket probabilities using all candidate sentences as denominator, matching FantLab's public “randomly selected sentence” wording. A sentence shorter than the position or an unresolved token contributes zero to that bucket numerator.
- Keep service-word count unresolved because the exact FantLab POS-to-service aggregation is still not established.
- Add a versioned JSON schema, tests, public documentation, and durable state/changelog updates.
Non-goals
- No native pylem build/runtime claim in this unit.
- No noun/cardinal recovery heuristic for runtime
N. - No first-analysis/weight-based homonym selection.
- No claim that sentence-bounded adjacency or the exact denominator choices reproduce FantLab until source-matched benchmarks discriminate them.
- No service-word folding guess.
Acceptance criteria
- Empty input, direct mappings, ambiguous homonyms, unresolved runtime categories, sentence boundaries, bigram normalization, and 1..20 position denominators have deterministic tests.
- The artifact exposes mapping/profile identity and is schema-valid under Draft 2020-12.
- All FantLab-shaped values remain
inferred; unresolved information is visible rather than coerced. - Existing deterministic metric behavior is unchanged.
- State records the unit as review-ready rather than self-merging the authored change.
Evidence
docs/AOT_PYLEM_COMPATIBILITY.mdcompatibility/aot-pylem-0.0.18-to-fantlab-2022-v1.jsondocs/FANTLAB_METRIC_CONTRACT.md- https://fantlab.ru/article374
- https://fantlab.ru/work127106/lp (current
/lpwording for bigram and sentence-position tables)
Metadata
Metadata
Assignees
Labels
No labels
Activity