Link Search Menu Expand Document

Token Classification

Initialize a HappyTokenClassification() object for token classification

Initialization Arguments:

  1. model_type (string): specify the model name in all caps, such as “ROBERTA” or “ALBERT”
  2. model_name(string): potential models can be found here

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") 

Table of contents