Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问clear审计未展示

entity-extractor实体提取器

Agent Skill

entity-extractor 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

23,372

周安装

620

GitHub Stars

公开资料未说明

下载量

4,890
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:entity-extractor(实体提取器)
来源仓库:https://github.com/eddiebe147/claude-settings
仓库路径:skills/entity-extractor
安装命令:
npx skills add eddiebe147/claude-settings --skill "entity-extractor"
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

AgentSkills.tonpx skills
npx skills add eddiebe147/claude-settings --skill "entity-extractor"

简介

entity-extractor 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中快速定位候选结果。

  • 适用于关键词搜索、任务场景匹配和来源线索筛选等研究检索场景。
  • 通过 github 安装并使用 npx skills add eddiebe147/claude-settings --skill "entity-extractor" 命令部署。
  • 安装前需确认权限范围、维护状态及是否涉及联网或文件操作。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

name
Entity Extractor
slug
entity-extractor
description
Extract named entities from text with high accuracy and customization
category
ai-ml
complexity
intermediate
version
1.0.0
author
ID8Labs
triggers
tags

Entity Extractor

The Entity Extractor skill guides you through implementing named entity recognition (NER) systems that identify and classify entities in text. From people and organizations to domain-specific entities like products, medical terms, or financial instruments, this skill covers extraction approaches from simple pattern matching to advanced neural models.

Entity extraction is a foundational NLP task that powers applications from search engines to knowledge graphs. Getting it right requires understanding your domain, choosing appropriate techniques, and handling the inherent ambiguity in natural language.

Whether you need to extract standard entity types, define custom entities for your domain, or build relation extraction on top of entity recognition, this skill ensures your extraction pipeline is accurate and maintainable.

Core Workflows

Workflow 1: Choose Extraction Approach

  1. Define target entities:

- Standard types: PERSON, ORG, LOCATION, DATE, MONEY - Domain-specific: PRODUCT, SYMPTOM, GENE, CONTRACT - Relations: connections between entities

  1. Assess available resources:

- Labeled training data - Domain expertise - Compute constraints

  1. Select approach:
ApproachTraining DataAccuracySpeedCustomization
spaCy (pre-trained)NoneGoodVery fastLimited
Rule-basedNoneVariableFastHigh
Fine-tuned BERT100s-1000sExcellentMediumFull
LLM (zero-shot)NoneGoodSlowPrompt-based
LLM (few-shot)Few examplesVery goodSlowPrompt-based
  1. Plan implementation and evaluation

Workflow 2: Implement Entity Extraction Pipeline

  1. Set up extraction:
   import spacy

   class EntityExtractor:
       def __init__(self, model="en_core_web_trf"):
           self.nlp = spacy.load(model)

       def extract(self, text):
           doc = self.nlp(text)
           entities = []
           for ent in doc.ents:
               entities.append({
                   "text": ent.text,
                   "type": ent.label_,
                   "start": ent.start_char,
                   "end": ent.end_char,
                   "confidence": getattr(ent, "confidence", None)
               })
           return entities

       def extract_batch(self, texts):
           docs = list(self.nlp.pipe(texts))
           return [self.extract_from_doc(doc) for doc in docs]
  1. Post-process entities:

- Normalize variations (IBM vs I.B.M.) - Resolve abbreviations - Link to knowledge base

  1. Validate extraction quality
  2. Handle edge cases

Workflow 3: Build Custom Entity Recognizer

  1. Prepare training data:
   # Format for spaCy training
   TRAIN_DATA = [
       ("Apple released the new iPhone today.", {
           "entities": [(0, 5, "ORG"), (24, 30, "PRODUCT")]
       }),
       ("Dr. Smith prescribed metformin for diabetes.", {
           "entities": [(0, 9, "PERSON"), (21, 30, "DRUG"), (35, 43, "CONDITION")]
       })
   ]
  1. Configure training:
   # spaCy config for NER training
   config = {
       "training": {
           "optimizer": {"learn_rate": 0.001},
           "batch_size": {"@schedules": "compounding", "start": 4, "stop": 32}
       },
       "components": {
           "ner": {
               "factory": "ner",
               "model": {"@architectures": "spacy.TransitionBasedParser"}
           }
       }
   }
  1. Train model:
   python -m spacy train config.cfg --output ./models --paths.train ./train.spacy --paths.dev ./dev.spacy
  1. Evaluate on held-out data
  2. Iterate based on errors

Quick Reference

ActionCommand/Trigger
Extract entities"Extract entities from [text]"
Choose NER model"Best NER for [domain]"
Custom entities"Train custom entity recognizer"
Evaluate NER"Evaluate entity extraction quality"
Handle ambiguity"Resolve ambiguous entities"
Entity linking"Link entities to knowledge base"

Best Practices

  • Start with Pre-trained: Don't train from scratch unnecessarily

- spaCy, Hugging Face, and cloud APIs cover common entities - Test pre-trained models first - Fine-tune only when needed

  • Define Clear Guidelines: Entity boundaries are ambiguous

- "Dr. John Smith" - one entity or two? - "New York Times" - ORG or GPE? - Create and follow consistent annotation guidelines

  • Handle Nested Entities: Some entities contain others

- "Bank of America headquarters" (ORG inside LOCATION) - Decide on nesting strategy upfront - Some models support flat only; others handle nested

  • Normalize Extracted Entities: Raw text has variations

- "IBM", "I.B.M.", "International Business Machines" - Canonicalize to standard form - Link to knowledge base IDs when possible

  • Evaluate Granularly: Aggregate metrics hide issues

- Report precision/recall per entity type - Analyze error patterns - Test on edge cases explicitly

  • Consider Context Window: Models have context limits

- Long documents may need chunking - Preserve context across chunks when possible - Re-run on boundaries if entities might span

Advanced Techniques

LLM-Based Entity Extraction

Use language models for flexible extraction:

def llm_extract_entities(text, entity_types):
    prompt = f"""Extract named entities from the following text.

Text: "{text}"

Entity types to extract:
{chr(10).join(f"- {t}: {desc}" for t, desc in entity_types.items())}

Return a JSON array of entities:
[{{"text": "entity text", "type": "ENTITY_TYPE", "start": 0, "end": 10}}]

Only include entities that clearly match the specified types.
"""

    response = llm.complete(prompt, response_format={"type": "json_object"})
    return json.loads(response)["entities"]

# Example usage
entity_types = {
    "COMPANY": "Business organizations",
    "PRODUCT": "Commercial products or services",
    "PERSON": "Individual people's names"
}
entities = llm_extract_entities(text, entity_types)

Hybrid Rule + ML Approach

Combine patterns with neural extraction:

class HybridExtractor:
    def __init__(self):
        self.ml_extractor = spacy.load("en_core_web_trf")
        self.patterns = load_pattern_rules()

    def extract(self, text):
        # ML extraction
        ml_entities = self.ml_extractor(text).ents

        # Pattern-based extraction
        pattern_entities = apply_patterns(text, self.patterns)

        # Merge with priority rules
        merged = merge_entities(
            ml_entities,
            pattern_entities,
            priority="pattern"  # Patterns override ML when overlap
        )

        return merged

    def add_pattern(self, pattern, entity_type):
        """Add domain-specific pattern."""
        self.patterns.append({
            "pattern": pattern,
            "type": entity_type
        })

Entity Linking

Connect extracted entities to knowledge bases:

def link_entity(entity_text, entity_type, knowledge_base):
    """
    Link extracted entity to canonical entry in knowledge base.
    """
    # Generate candidates
    candidates = knowledge_base.search(
        query=entity_text,
        type_filter=entity_type,
        limit=10
    )

    if not candidates:
        return {"entity": entity_text, "linked": None}

    # Score candidates
    scored = []
    for candidate in candidates:
        score = compute_linking_score(
            entity_text,
            candidate.name,
            candidate.aliases
        )
        scored.append((candidate, score))

    # Select best match
    best = max(scored, key=lambda x: x[1])

    if best[1] > LINKING_THRESHOLD:
        return {
            "entity": entity_text,
            "linked": best[0].id,
            "canonical_name": best[0].name,
            "confidence": best[1]
        }
    else:
        return {"entity": entity_text, "linked": None}

Relation Extraction

Extract relationships between entities:

def extract_relations(text, entities):
    """
    Given extracted entities, find relations between them.
    """
    prompt = f"""Given this text and extracted entities, identify relationships.

Text: "{text}"

Entities found:
{json.dumps(entities, indent=2)}

Identify relationships between entities. Return JSON:
[{{
    "subject": "entity text",
    "relation": "relationship type",
    "object": "entity text",
    "confidence": 0.9
}}]

Common relation types: WORKS_FOR, LOCATED_IN, FOUNDED, ACQUIRED, PARTNER_OF
"""

    response = llm.complete(prompt)
    return json.loads(response)

Active Learning for NER

Efficiently improve extraction with targeted labeling:

def active_learning_sample(unlabeled_texts, model, n_samples=100):
    """
    Select texts that would be most valuable to label.
    """
    uncertainties = []

    for text in unlabeled_texts:
        doc = model(text)
        # Calculate uncertainty (various strategies)
        uncertainty = calculate_ner_uncertainty(doc)
        uncertainties.append((text, uncertainty))

    # Select most uncertain
    uncertainties.sort(key=lambda x: x[1], reverse=True)
    return [text for text, _ in uncertainties[:n_samples]]

def calculate_ner_uncertainty(doc):
    """
    Calculate uncertainty based on entity confidence scores.
    """
    if not doc.ents:
        return 0.5  # No entities - medium uncertainty

    confidences = [ent._.confidence for ent in doc.ents if hasattr(ent._, "confidence")]
    if not confidences:
        return 0.5

    # High uncertainty = low confidence entities
    return 1 - min(confidences)

Common Pitfalls to Avoid

  • Inconsistent annotation guidelines leading to noisy training data
  • Not handling entity boundary ambiguity (where does entity end?)
  • Ignoring nested or overlapping entities when they matter
  • Training on small datasets without augmentation
  • Not normalizing entities before downstream use
  • Assuming pre-trained models work on your domain without testing
  • Not evaluating per-entity-type performance
  • Forgetting about entity linking for disambiguation

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

29.14%
按下载量换算1,425

OpenCode

20.75%
按下载量换算1,015

Gemini CLI

18.37%
按下载量换算898

Antigravity

13.34%
按下载量换算652

Cursor

7.38%
按下载量换算361

windsurf

3.75%
按下载量换算183

安全审计

暂无安全审计结果可展示。

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills