{"id":26105439,"url":"https://github.com/ai-mindset/ner_playground","last_synced_at":"2026-07-13T22:32:29.803Z","repository":{"id":280605343,"uuid":"942533510","full_name":"ai-mindset/ner_playground","owner":"ai-mindset","description":"A playground for experimenting with spaCy and Named Entity Recognition","archived":false,"fork":false,"pushed_at":"2025-03-04T11:29:58.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-19T11:41:24.418Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ai-mindset.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-03-04T08:54:57.000Z","updated_at":"2025-03-05T10:10:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"52ff41b4-26a5-45c1-8328-48b8fc9c8708","html_url":"https://github.com/ai-mindset/ner_playground","commit_stats":null,"previous_names":["ai-mindset/ner_playground"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ai-mindset/ner_playground","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ai-mindset%2Fner_playground","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ai-mindset%2Fner_playground/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ai-mindset%2Fner_playground/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ai-mindset%2Fner_playground/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ai-mindset","download_url":"https://codeload.github.com/ai-mindset/ner_playground/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ai-mindset%2Fner_playground/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35439213,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-13T02:00:06.543Z","response_time":119,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-09T21:16:07.158Z","updated_at":"2026-07-13T22:32:29.796Z","avatar_url":"https://github.com/ai-mindset.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Named Entity Recognition Playground \n\nA comprehensive pipeline for performing Named Entity Recognition (NER) on text documents using spaCy.\n\n## Features\n\n- Extract standard named entities using spaCy's pre-trained models\n- Add custom entity patterns for domain-specific NER\n- Generate visualisations of recognised entities\n- Produce detailed analysis of entity type distribution\n- Save results in structured formats\n\n## Requirements\n\n- Python 3.12+\n- [uv](https://docs.astral.sh/uv/) package manager\n\n## Installation\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/ai-mindset/ner_playground.git\n   cd ner_playground \n   ```\n\n2. Create a virtual environment with UV:\n   ```bash\n   uv venv\n   source .venv/bin/activate  # On Windows: .venv\\Scripts\\activate\n   ```\n\n3. Install the package and development dependencies:\n   ```bash\n   uv pip install -e \".[dev]\"\n   ```\n\n4. Install the spaCy model:\n   ```bash\n   # Download the model wheel directly\n   curl -LO https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.8.0/en_core_web_sm-3.8.0-py3-none-any.whl\n\n   # Install it directly with UV\n   uv pip install en_core_web_sm-3.8.0-py3-none-any.whl\n   ```\n\n## Usage\n\nRun the NER analysis on a text file:\n\n```bash\npython -m src.ner.main --input texts/sample.txt --output plots/entities.html\n```\n\n### API Usage\n\n```python\nfrom src.ner.main import perform_ner_analysis\n\n# Sample text for analysis\ntext = \"\"\"spaCy is an open-source software library for advanced natural language processing, written in Python and Cython. The main developers are Matthew Honnibal and Ines Montani.\"\"\"\n\n# Run the analysis\nresults = perform_ner_analysis(text)\n\n# Access the entities found\nentities_df = results[\"all_entities\"]\nprint(entities_df)\n\n# The HTML visualisation is available at\nhtml_viz = results[\"visualization_html\"]\n```\n\n## Project Structure\n\n```\nner_playground/\n├── pyproject.toml         # Project configuration and dependencies\n├── src/\n│   └── ner/\n│       └── main.py        # Main NER pipeline implementation\n├── texts/                 # Sample texts for analysis\n└── plots/                 # Output directory for visualisations\n```\n\n## How It Works\n\nThe NER pipeline performs the following steps:\n\n1. Loads the spaCy language model (`en_core_web_sm`)\n2. Processes the input text to create a spaCy document\n3. Extracts standard named entities (people, organisations, locations, etc.)\n4. Applies custom entity patterns for domain-specific terminology\n5. Combines all entities and sorts them by position in the text\n6. Generates a summary of entity type distribution\n7. Creates an HTML visualisation of the entities in context\n8. Returns structured results for further analysis\n\n## Customisation\n\nYou can customise the NER pipeline by modifying the custom patterns in `src/ner/main.py`. The default implementation includes patterns for programming languages and libraries.\n\n## Troubleshooting\n\nIf you encounter errors with spaCy model loading:\n\n1. Verify the model is installed correctly:\n   ```bash\n   python -c \"import spacy; print(spacy.util.get_installed_models())\"\n   ```\n\n2. If the model is not listed, reinstall using the method in the Installation section.\n\n## Licence\n\nMIT \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fai-mindset%2Fner_playground","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fai-mindset%2Fner_playground","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fai-mindset%2Fner_playground/lists"}