Catalog PyPI
Back to packageRELEASE DETAILS

0.1.0

PyPI

acs-classifex

A Python package for training a custom NER model using spaCy

Published12 Nov 2024
Direct dependencies1
Transitive dependenciesNot calculated

README

Version 0.1.0 documentation

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])

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 1

Native requirements
1 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
spacy
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.6",
  "evaluation": "NOT_EVALUATED"
}
spacy>=3.0.0runtime

Distribution files

2 collected
acs_classifex-0.1.0-py3-none-any.whl

bdist_wheel · 2.68 KB · Python py3

Source file
acs_classifex-0.1.0.tar.gz

sdist · 2.33 KB · Python source

Source file

Repository

PENDING
godhorus/acs_classifex

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 18:27 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:27e352ef1d502c0f8522dbf72c25f3a2eb8ac0c20eeef943d6eee26793764da9

Other collected versions

View all collected versions →