Pos Tagging Fixes
Diagnose and fix part-of-speech tagging in the compromise source repository.
Install
npx skills add spencermountain/compromise --skill pos-tagging-fixes -g -a claude-code -y- Repository
- spencermountain/compromise12.2k
- Category
- Media
- Updated
- 5d ago
- License
- MIT
- Context cost
- Mediumabout 3,000 tokens
- Runs scripts
- No, instructions only
What it does
Diagnose and fix part-of-speech tagging in the compromise source repository. Choose between lexical data, ambiguity clues, indexed neighbour rules, preTagger logic, and postTagger patterns with attention to execution order, side effects, runtime, and bundle size. Use for internal tagging changes, not ordinary application-level use of compromise.
Internal POS-tagging fixes
Work from the repository root. Read its AGENTS.md and preserve concurrent changes. This skill does not authorize dependency changes, existing-test edits, commits, or PRs. If generating tests, write cases and expectations blindly from the requested language behaviour before researching the implementation; do not derive expected results from the current tagger.
Choose the smallest intervention that expresses the linguistic distinction at the stage where its evidence exists. Runtime, filesize, and behavioural scope are separate costs. A one-line switch assignment can change more behaviour than a longer contextual rule. General postTagger rules are by far the slowest intervention; sometimes their wider context is necessary. Hand-made preTagger loops can be fast but add substantial code for niche cases. Prefer an existing data table or indexed rule when it expresses the same condition faithfully.
Establish the failure
Record the input, target term, expected tags, and contrasting readings that must remain valid.
Use compromise's conventions in tagging differences and
tag definitions, not a different tagger's labels. Distinguish a
wrong POS from a tokenization, contraction, entity-selection, or chunking failure. Correct tags
with a wrong .verbs() selection may require a selection fix rather than another tagging rule.
Reproduce with ESM imports from ./src/two.js or ./src/three.js. Avoid stale CommonJS builds.
Start with a word-filtered trace, enabling it before parsing:
import nlp from './src/three.js'
nlp.verbose('tagger', { word: 'walk' })
const doc = nlp('They walk home.')
nlp.verbose(false)
doc.debug()
console.dir(doc.json(), { depth: null })


