Class EnglishPOSLexicon

java.lang.Object
smile.nlp.pos.EnglishPOSLexicon

public class EnglishPOSLexicon extends Object
An English lexicon with part-of-speech tags.
  • Method Details

    • get

      public static Optional<PennTreebankPOS[]> get(String word)
      Returns the part-of-speech tags for the given word, or an empty Optional if the word does not exist in the dictionary.
      Parameters:
      word - the word to look up.
      Returns:
      an Optional containing the POS tags, or empty if unknown.