Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bulk-ner

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bulk-ner

A no-strings inference implementation framework Named Entity Recognition (NER) service of wrapped AI models powered by AREkit and the related text-processing pipelines.

  • 0.24.1
  • PyPI
  • Socket score

Maintainers
1

bulk-ner 0.24.1

twitter

A no-strings inference implementation framework Named Entity Recognition (NER) service of wrapped AI models powered by AREkit and the related text-processing pipelines.

The key benefits of this tiny framework are as follows:

  1. ☑️ Native support of batching;
  2. ☑️ Native long-input contexts handling.

Installation

pip install bulk-ner==0.24.1

Usage

This is an example for using DeepPavlov==1.3.0 as an adapter for NER models passed via --adapter parameter:

python -m bulk_ner.annotate \
    --src "test/data/test.tsv" \
    --prompt "{text}" \
    --batch-size 10 \
    --adapter "dynamic:models/dp_130.py:DeepPavlovNER" \
    --output "test-annotated.jsonl" \
    %% \
    --model "ner_ontonotes_bert_mult"

You can choose the other models via --model parameter.

List of the supported models is available here: https://docs.deeppavlov.ai/en/master/features/models/NER.html

Deploy your model

Quick example: Check out the default DeepPavlov wrapper implementation

All you have to do is to implement the BaseNER class that has the following protected method:

  • _forward(sequences) -- expected to return two lists of the same length:
    • terms -- related to the list of atomic elements of the text (usually words)
    • labels -- B-I-O labels for each term.

Powered by

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc