Package lingscope.drivers
Class PosTaggerDriver
- java.lang.Object
-
- lingscope.drivers.PosTaggerDriver
-
public class PosTaggerDriver extends Object
Driver for the Part of Speech tagger. Use this to tag all sentences in a given file with part of speech tags- Author:
- shashank
-
-
Constructor Summary
Constructors Constructor Description PosTaggerDriver()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringgetTaggedSentence(String grammerFile, String sentenceToTag, boolean isTokenized)Gets the equivalent POS sentence for the given sentenceToTagstatic voidmain(String[] args)
-
-
-
Method Detail
-
getTaggedSentence
public static String getTaggedSentence(String grammerFile, String sentenceToTag, boolean isTokenized)
Gets the equivalent POS sentence for the given sentenceToTag- Parameters:
grammerFile- file containing POS modelsentenceToTag- sentence for which POS tags will be returnedis-- Returns:
- a string where the words from sentenceToTag are replaced with corresponding part of speech tags
-
main
public static void main(String[] args)
- Parameters:
args- 0 - file containing the part of speech model 1 - input file 2 - output file 3 - (boolean) does the input file contain annotated sentence (true) or not (false)
-
-