Skip to main content

Named Entity Recognition

Project description

Usage Sample ''''''''''''

.. code:: python

    import torch
    from transformers import AutoTokenizer
    from nerx import NER, Collator
    from model_wrapper import ClassifyModelWrapper
    
    model = NER('hlf/rb3', num_classes=8)
    tokenizer = AutoTokenizer.from_pretrained('hlf/rb3')
    wrapper = ClassifyModelWrapper(model)
    history = wrapper.train(train_set, val_set, 
                            collate_fn=Collator(tokenizer, label_padding_id=7))

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

NERX-0.0.8.tar.gz (7.1 kB view details)

Uploaded Source

File details

Details for the file NERX-0.0.8.tar.gz.

File metadata

  • Download URL: NERX-0.0.8.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.18

File hashes

Hashes for NERX-0.0.8.tar.gz
Algorithm Hash digest
SHA256 fdbc84499f3fd2b4afb0c09f02a853b86df4838d5f3b9ac48c91c2acb5652486
MD5 ef0051222206f513e5720db904b192e5
BLAKE2b-256 34eb8236dc95b977ec697fc20fc165a6bc2510f890f20bd665342e6771b800ed

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