majiayu000/claude-skill-registry-data/adjacent-span-merging
Claude Code and agent skill by majiayu000/claude-skill-registry-data
- community
Checking that the SKILL.md file is still in the repository.
Author "majiayu000" has blocked skill(s)
Merges nearby predicted NER spans of the same class within a word-distance threshold into single coherent segments.
Install
npx vskill@latest install majiayu000/claude-skill-registry-data/adjacent-span-mergingSKILL.md
Adjacent Span Merging
Overview
Token-level NER models often fragment a single discourse element into multiple adjacent spans — a long "Evidence" paragraph gets split into two or three pieces. Adjacent span merging fixes this by joining same-class spans that are within a configurable word-distance gap. This is especially important for long-document NER where discourse elements span many sentences.
Quick Start
Workflow
- Group predictions by (document_id, class)
- Sort word indices across all spans of the same class
- Walk through sorted indices; if gap between consecutive words <= max_gap, merge
- Otherwise start a new span
- Optionally limit merging to specific classes (e.g., only "Evidence")
Key Decisions
- max_gap: 1-2 for tight merging; higher values risk over-merging distinct spans
- Selective classes: Only merge classes known to fragment (long spans like Evidence)
- Max merged length: Optionally cap merged span length to prevent runaway merging
- Order: Apply merging before length/probability filtering
References
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingdocuments/adjacent-span-merging/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/majiayu000/claude-skill-registry-data/adjacent-span-merging)