|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.aitools.ie.decomposition.word.WordDecompositionOpenNLP
public class WordDecompositionOpenNLP
This class decomposes a given String
into words with machine learning
technique using openNLP.
WordDecompositionICU4J
,
WordDecompositionDelim
Constructor Summary | |
---|---|
WordDecompositionOpenNLP(java.util.Locale locale)
Initialises a new decomposition depended on the trained language. |
|
WordDecompositionOpenNLP(java.lang.String modelFile)
Initialises a new decomposition using a maximum entropy model. |
Method Summary | |
---|---|
java.util.List<Span> |
getSpans(java.lang.String text)
Analyses a string and split it in parts. |
java.util.List<java.lang.String> |
getStrings(java.lang.String text,
boolean asSubstring)
Analyses a string and split it in parts. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WordDecompositionOpenNLP(java.lang.String modelFile) throws java.io.IOException
modelFile
- Location of the maximum entropy model.
java.io.IOException
public WordDecompositionOpenNLP(java.util.Locale locale) throws java.lang.Exception
locale
- for language
java.lang.Exception
Method Detail |
---|
public java.util.List<Span> getSpans(java.lang.String text)
Decomposition
Span
s with start/end index in original string.
getSpans
in interface Decomposition
text
- The original text to decompose.
Span
with start/end index in the original string.Decomposition#getStrings(String, boolean)}
public java.util.List<java.lang.String> getStrings(java.lang.String text, boolean asSubstring)
Decomposition
getStrings
in interface Decomposition
text
- The original text to decompose.asSubstring
- If true, returned strings in list are substrings of input text
else explicit copies are returned. A substring is a pointer to the
original string and start/end position. A string copy is an exact
copy of the part.Decomposition#getSpans(String)}
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |