pt.uminho.anote2.datastructures.nlptools
Class OpenNLP
java.lang.Object
pt.uminho.anote2.datastructures.nlptools.OpenNLP
public class OpenNLP
- extends java.lang.Object
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
sentenceModelFile
public static final java.lang.String sentenceModelFile
- See Also:
- Constant Field Values
tokeniserModelFile
public static final java.lang.String tokeniserModelFile
- See Also:
- Constant Field Values
postaggingModelFile
public static final java.lang.String postaggingModelFile
- See Also:
- Constant Field Values
postaggingModelPerceptionFile
public static final java.lang.String postaggingModelPerceptionFile
- See Also:
- Constant Field Values
OpenNLP
public OpenNLP()
throws java.io.FileNotFoundException
- Throws:
java.io.FileNotFoundException
initModel
public void initModel()
throws java.io.FileNotFoundException
- Throws:
java.io.FileNotFoundException
getSentencesText
public java.util.List<ISentence> getSentencesText(java.lang.String text)
posTaggingSentence
public ISentence posTaggingSentence(java.lang.String text,
long startOffset)
throws opennlp.tools.util.InvalidFormatException,
java.io.IOException
- Throws:
opennlp.tools.util.InvalidFormatException
java.io.IOException
getSetencesWhitPOSTagging
public java.util.List<ISentence> getSetencesWhitPOSTagging(java.lang.String text)
geTextSegmentsFilterByPOSTags
public java.util.List<ITextSegment> geTextSegmentsFilterByPOSTags(java.lang.String text,
java.util.Set<java.lang.String> posTags)
main
public static void main(java.lang.String[] args)
throws opennlp.tools.util.InvalidFormatException,
java.io.IOException
- Throws:
opennlp.tools.util.InvalidFormatException
java.io.IOException