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.25.2
Third-party providers hosting↗️
A no-strings inference implementation framework Named Entity Recognition (NER) service of wrapped AI models ↗️.
The key features of this framework are:
- ☑️ Native support of batching;
- ☑️ Native long-input contexts handling.
Installation
From PyPI:
pip install bulk-ner
or latest from Github:
pip install git+https://github.com/nicolay-r/bulk-ner@main
Usage
API
Please take a look at the related Wiki page
Shell
NOTE: You have to install
source-iterpackage
This is an example for using DeepPavlov==1.3.0 as an adapter for NER models passed via --adapter parameter:
- Downloading provider:
wget https://raw.githubusercontent.com/nicolay-r/nlp-thirdgate/refs/heads/master/ner/dp_130.py
- Launching inference:
python -m bulk_ner.annotate \
--src "test/data/test.tsv" \
--prompt "{text}" \
--batch-size 10 \
--adapter "dynamic:dp_130.py:DeepPavlovNER" \
--output "test-annotated.jsonl" \
%%m \
--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
Third-party providers hosting↗️
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
The pipeline construction components were taken from AREkit [github]
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bulk_ner-0.25.2.tar.gz.
File metadata
- Download URL: bulk_ner-0.25.2.tar.gz
- Upload date:
- Size: 15.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
00f5b10e71d594de6ec6000002014b12094d0a4cf12b058f326ff4481029ce0f
|
|
| MD5 |
2234b797b977d47c8db796cbd5afb56c
|
|
| BLAKE2b-256 |
88613f476f8351cda43caa4f21d23f2d6430277744c1f8c8c55fc17acc5155a3
|
File details
Details for the file bulk_ner-0.25.2-py3-none-any.whl.
File metadata
- Download URL: bulk_ner-0.25.2-py3-none-any.whl
- Upload date:
- Size: 18.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36f77a453f18fe192db9a91079c72fdca2ac96befda25aee83e106221ac5a934
|
|
| MD5 |
85cfbe5cf8b14ed5d95d871d1b42abe5
|
|
| BLAKE2b-256 |
41ae55c5a39a816396c3a26cf880da41eb9eed9fb362b0e04c67132b4213d5ba
|