# Pos Tagging Fixes

Diagnose and fix part-of-speech tagging in the compromise source repository.

- Repository: https://github.com/spencermountain/compromise (12169 stars)
- Category: Media
- License: MIT
- Last updated: 2026-10-30
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add spencermountain/compromise --skill pos-tagging-fixes -g -a claude-code -y`
Codex: `npx skills add spencermountain/compromise --skill pos-tagging-fixes -g -a codex -y`
Cursor: `npx skills add spencermountain/compromise --skill pos-tagging-fixes -g -a cursor -y`
Gemini CLI: `npx skills add spencermountain/compromise --skill pos-tagging-fixes -g -a gemini-cli -y`

## Description

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.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# 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](../../../docs/tagging-differences.md) and
[tag definitions](../../../docs/tag-definitions.md), 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:

```js
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 })
```

The rest: https://github.com/spencermountain/compromise/blob/HEAD/skills/internal/pos-tagging-fixes/SKILL.md
