Compromise NLP
Writes and debugs JavaScript code that uses the compromise English NLP library.
Install
npx skills add spencermountain/compromise --skill compromise -g -a claude-code -y- Repository
- spencermountain/compromise12.2k
- Category
- Engineering
- Updated
- 5d ago
- License
- MIT
- Context cost
- Mediumabout 1,934 tokens
- Runs scripts
- No, instructions only
What it does
Write and debug JavaScript or TypeScript that uses the compromise English NLP library to match text, extract entities or numbers, customize tagging, and transform sentences. Use when the user requests compromise or the project already uses it, especially for its match syntax, selection semantics, build tiers, and plugins.
Using compromise
Compromise is a rule-based English NLP library that runs locally in Node.js and browsers. Its tagging and transformations are heuristic; it does not provide a dependency parse tree, semantic understanding, or an LLM service.
Choose the API for the installed version
Inspect the project's compromise version, import, and registered plugins before choosing APIs.
Prefer the full import nlp from 'compromise' for ordinary use:
| Import | Available features |
|---|---|
compromise or compromise/three | Tokenization, tagging, named selections and transforms |
compromise/two | Tokenization and tagging; no .people(), .verbs(), or .numbers() |
compromise/one or compromise/tokenize | Tokenization; no automatic part-of-speech tagging |
Use the existing module system; CommonJS can use const nlp = require('compromise').
If a method is missing, check the build tier, version, and plugins before inventing a replacement API.
Specialized transforms belong on specialized selections: use .verbs().toPastTense(),
not .match('#Verb').toPastTense().
Read only the detailed docs needed for the task. These paths resolve inside this repository
and packages that ship this skill alongside docs/:
- API: method names, arguments, and specialized selection methods.
- Match syntax: pattern operators and capture groups.
- Tag definitions: valid tags and their hierarchy.
- Concepts: document, View, Term, and mutation semantics.
- Recipes: task-specific starting points.
- Tagging differences: conventions when comparing other taggers.
