acs_classifex
This package provides utilities to train and load a custom Named Entity Recognition (NER) model using spaCy.
Installation
pip install acs_classifex
Usage
from acs_classifex import train_ner, load_model
Training data format: [(text, {'entities': [(start, end, label)]})]
training_data = [ ("Apple is looking at buying U.K. startup for $1 billion", {'entities': [(0, 5, 'ORG'), (27, 31, 'GPE'), (44, 54, 'MONEY')]}), ("San Francisco is a beautiful city", {'entities': [(0, 13, 'GPE')]}) ]
Train the NER model
train_ner(training_data)
Load the trained model
nlp = loadmodel() doc = nlp("Apple is acquiring a company in London") print([(ent.text, ent.label) for ent in doc.ents])
Metadata
Release files for acs-classifex 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| acs_classifex-0.1.0.tar.gz | 2.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| acs_classifex-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.1 kB
Release files / acs_classifex-0.1.0.tar.gz
| Download URL | acs_classifex-0.1.0.tar.gz |
|---|---|
| Size | 2.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7aa3b10f53413fbbabb9879b1c2a4d6c97ca5a6232fe4b9279b6cbb1cd8df3dd
|
|
BLAKE2b-256 checksum How to use checksums |
b2ca178dc35005d1b7ed63ea9376e58e91430eed34b2bb2986e7f8d5360caddf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Release files / acs_classifex-0.1.0-py3-none-any.whl
| Download URL | acs_classifex-0.1.0-py3-none-any.whl |
|---|---|
| Size | 2.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8d387719c4396d9cf6efd9d38a872dfe4cecf83c851c43c2535527c548993822
|
|
BLAKE2b-256 checksum How to use checksums |
7e5ca902349f96e0ae8f19e15d3a4902cf5b20fcd15be3287122f2bffe1ba7ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|