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.1.0.tar.gz (7.2 kB view details)

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for NERX-0.1.0.tar.gz
Algorithm Hash digest
SHA256 02b312c87d4e881c0aad7abca4ced82de18be8b62f0597edf8c8ea034f9548d2
MD5 ffdd6e2107b259647b3f416adc5602b4
BLAKE2b-256 970473392805038b3d87ccd18070c95deded1dcfe0cc58d490e7cb4ba1e9e6a9

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