Skip to main content

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

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bulk_ner-0.24.1.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

bulk_ner-0.24.1-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

Details for the file bulk_ner-0.24.1.tar.gz.

File metadata

  • Download URL: bulk_ner-0.24.1.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.5

File hashes

Hashes for bulk_ner-0.24.1.tar.gz
Algorithm Hash digest
SHA256 cc3898d0b7f39fb5b7729a01f6c7fa92a011601cf3ba77a1115d1856e67fe011
MD5 91ff313c00d4f6333245958a34c208cf
BLAKE2b-256 5ca473e2041b958cc5271512cd9b01f9c9f6b5a186970c6e969805310c65258d

See more details on using hashes here.

File details

Details for the file bulk_ner-0.24.1-py3-none-any.whl.

File metadata

  • Download URL: bulk_ner-0.24.1-py3-none-any.whl
  • Upload date:
  • Size: 12.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.5

File hashes

Hashes for bulk_ner-0.24.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4768480b839eded74f0191bd52802d10d76d918c375d5cd5972de5587ad884fe
MD5 9af9f885358c1a817f409de34f0639bd
BLAKE2b-256 9b2581e810cde34fd377b8920e3f0d977c31a44526b24de50c41856d08aa970d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page