Package smile.nlp

Class Bigram

java.lang.Object
smile.nlp.Bigram
Direct Known Subclasses:
Bigram

public class Bigram extends Object
Bigrams or digrams are groups of two words, and are very commonly used as the basis for simple statistical analysis of text. They are a special case of N-gram.
  • Field Details

    • w1

      public final String w1
      Immutable first word of bigram.
    • w2

      public final String w2
      Immutable second word of bigram.
  • Constructor Details

    • Bigram

      public Bigram(String w1, String w2)
      Constructor.
      Parameters:
      w1 - the first word of bigram.
      w2 - the second word of bigram.
  • Method Details