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

Uploaded Source

File details

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

File metadata

  • Download URL: NERX-0.0.9.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.0.9.tar.gz
Algorithm Hash digest
SHA256 41ed267fa7ddf59ecc219c20aa85052e5c4ced4de9b6c2e427986538c1b79962
MD5 a2dff5214b35be698f07fcb8f07ed2f9
BLAKE2b-256 e70e154d1aaba1c9ccc97c9e366cad73d4318b7674a325824bb6d2cea63b2873

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