Link Search Menu Expand Document

Next Sentence Prediction

Initialize a HappyNextSentence() object to next sentence prediction

Initialization Arguments:

  1. model_type (string): The default is “BERT”, which is currently the only available model
  2. model_name(string): We recommend BERT models like “bert-base-uncased” and “bert-large-uncased” that have not been finetuned

Example 6.0:

    from happytransformer import HappyNextSentence
    # --------------------------------------#
    happy_ns = HappyNextSentence("BERT", "bert-base-uncased")  # default 
    happy_ns_large = HappyNextSentence("BERT", "bert-large-uncased") 

Table of contents