| java.lang.Object nl.hippo.cms.spellchecking.DefaultWordFinder nl.hippo.cms.spellchecking.XMLWordFinder
XMLWordFinder | public class XMLWordFinder extends DefaultWordFinder (Code) | | A word finder for XMLdocuments, which searches text for
sequences of letters, but ignores tags.
See Also: DefaultWordFinder author: Bruno Martins |
Method Summary | |
public String | currentSegment() Returns the current text segment from the input. | public String | next() This method scans the text from the end of the last word, and returns a
String corresponding to the next word. | public static String[] | splitSegments(String text) Splits a given String into an array with its constituent text segments.
Parameters: text - A String. | public static String[] | splitWords(String text) Splits a given String into an array with its constituent words.
Parameters: text - A String. |
XMLWordFinder | public XMLWordFinder(String inText)(Code) | | Constructor for XMLWordFinder.
Parameters: inText - A String with the input text to tokenize. |
XMLWordFinder | public XMLWordFinder()(Code) | | Constructor for XMLWordFinder.
|
currentSegment | public String currentSegment()(Code) | | Returns the current text segment from the input. A segment is defined as the
character sequence between the current position and the next non-alphanumeric character,
considering also white spaces.
A String with the current text segment. |
next | public String next()(Code) | | This method scans the text from the end of the last word, and returns a
String corresponding to the next word. If there are no more words to
return, it retuns a null String.
the next word. |
splitSegments | public static String[] splitSegments(String text)(Code) | | Splits a given String into an array with its constituent text segments.
Parameters: text - A String. An array with the text segments extracted from the String. |
splitWords | public static String[] splitWords(String text)(Code) | | Splits a given String into an array with its constituent words.
Parameters: text - A String. An array with the words extracted from the String. |
Methods inherited from nl.hippo.cms.spellchecking.DefaultWordFinder | public String current()(Code)(Java Doc) public String currentNGram(int n)(Code)(Java Doc) public String currentSegment()(Code)(Java Doc) public String currentWordGram(int n)(Code)(Java Doc) public String getText()(Code)(Java Doc) public boolean hasNext()(Code)(Java Doc) protected int ignore(int index, char startIgnore)(Code)(Java Doc) protected int ignore(int index, char startIgnore, char endIgnore)(Code)(Java Doc) protected int ignore(int index, Character startIgnore, Character endIgnore)(Code)(Java Doc) protected int ignore(int index, String startIgnore, String endIgnore)(Code)(Java Doc) protected static boolean isWordChar(String text, int posn)(Code)(Java Doc) protected static boolean isWordChar(char c)(Code)(Java Doc) public String lookAhead()(Code)(Java Doc) public String next()(Code)(Java Doc) public String nextSegment()(Code)(Java Doc) public void replace(String newWord)(Code)(Java Doc) public void replaceBigram(String newBigram)(Code)(Java Doc) public void replaceSegment(String newSegment)(Code)(Java Doc) public void setText(String newText)(Code)(Java Doc) public static String[] splitNGrams(String text, int n)(Code)(Java Doc) public static String[] splitSegments(String text)(Code)(Java Doc) public static String[] splitWordGrams(String text, int n)(Code)(Java Doc) public static String[] splitWords(String text)(Code)(Java Doc) public boolean startsSentence()(Code)(Java Doc) public String toString()(Code)(Java Doc)
|
|
|