|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ISegmenter
Common methods to provide segmentation facility to extracted content.
| Method Summary | |
|---|---|
int |
computeSegments(java.lang.String text)
Calculate the segmentation of a given plain text string. |
int |
computeSegments(TextContainer container)
Calculates the segmentation of a given TextContainer object. |
LocaleId |
getLanguage()
Gets the language used to apply the rules. |
Range |
getNextSegmentRange(TextContainer container)
Compute the range of the next segment for a given TextContainer object. |
java.util.List<Range> |
getRanges()
Gets the list off all segments ranges calculated when calling computeSegments(String), or
computeSegments(TextContainer). |
java.util.List<java.lang.Integer> |
getSplitPositions()
Gets the list of all the split positions in the text that was last segmented. |
| Method Detail |
|---|
int computeSegments(java.lang.String text)
text - plain text to segment.
int computeSegments(TextContainer container)
container - the object to segment.
Range getNextSegmentRange(TextContainer container)
container - the text container where to look for the next segment.
java.util.List<java.lang.Integer> getSplitPositions()
computeSegments(TextContainer)
or computeSegments(String) before calling this method.
A split position is the first character position of a new segment.
IMPORTANT: The position returned here are the position WITHOUT taking in account any options for trimming or not leading and trailing white-spaces.
java.util.List<Range> getRanges()
computeSegments(String), or
computeSegments(TextContainer).
Range object where start is the start and end the end of the range.
Returns null if no ranges have been defined yet.LocaleId getLanguage()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||