Skip to main content

A minimal package exposing a simple NER runner using Hugging Face transformers pipeline.

Project description

ner_simple

A minimal package that exposes a single function run_ner(text, model=...) to run Named Entity Recognition using Hugging Face transformers pipeline.

Files

  • ner_simple/ner.py - contains run_ner function.
  • requirements.txt - basic dependencies.

Usage

pip install -r requirements.txt
# or install transformers and torch manually
from ner_simple import run_ner

text = "Barack Obama was born in Hawaii and was the 44th President of the United States."
entities = run_ner(text)
print(entities)

The default model is dbmdz/bert-large-cased-finetuned-conll03-english which is fine-tuned for CoNLL-03 NER tasks.

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

ner_simple-0.1.1.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ner_simple-0.1.1-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file ner_simple-0.1.1.tar.gz.

File metadata

  • Download URL: ner_simple-0.1.1.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for ner_simple-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b2f8d06fc75c0147eb3af890f19780f6beb152c23a9b2430e90210204a2421e9
MD5 7602a8961a32ec4ac75ccd18e2ba30e3
BLAKE2b-256 1f825c2099504078f7f1a491413556aefd2c20d06b71ec7d87da51bddc5bb845

See more details on using hashes here.

File details

Details for the file ner_simple-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: ner_simple-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for ner_simple-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2cd6be97177f139b4a48a8d4914d014b556b147775a1351a611e77edc638035e
MD5 307855fbed5e7ef8b148258f1d8fdba8
BLAKE2b-256 f36aaef1092e46fb1924759d84f9f22b73c5a07775ba63e826504e5cff142e05

See more details on using hashes here.

Supported by

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