Token Classification
Initialize a HappyTokenClassification() object for token classification
Initialization Arguments:
- model_type (string): specify the model name in all caps, such as “ROBERTA” or “ALBERT”
- model_name(string): potential models can be found here
- use_auth_token (string): Specify the authentication token to load private models.
- trust_remote_code (bool): Allow for custom Python files to be used from the model_name location.
Example 5.0:
from happytransformer import HappyTokenClassification
# --------------------------------------#
happy_toc = HappyTokenClassification("BERT", "dslim/bert-base-NER") # default
happy_toc_large = HappyTokenClassification("XLM-ROBERTA", "xlm-roberta-large-finetuned-conll03-english")
happy_toc_private = HappyTokenClassification("BERT", "user-repo/bert-base-NER", use_auth_token="123abc")