Class PosTagger


  • public class PosTagger
    extends Object
    Part of speech tagger
    Author:
    shashank
    • Constructor Detail

      • PosTagger

        public PosTagger​(String grammarFile)
        Creates an instance of POS tagger by loading the given grammar file
        Parameters:
        grammarFile -
    • Method Detail

      • replaceWordsWithPos

        public List<String> replaceWordsWithPos​(String sentence,
                                                boolean isTokenized)
        Takes a sentence as input and returns list of POS tags associated with each word in the sentence
        Parameters:
        sentence -
        isTokenized -
        Returns: