public class TextStringDocument extends Document
| Modifier and Type | Field and Description |
|---|---|
protected java.util.StringTokenizer |
tokenizer
The tokenizer for this document.
|
static java.lang.String |
tokenizerDelim
StringTokenizer delim for tokenizing only alphabetic strings.
|
nextToken, numStopWords, numTokens, stem, stemmer, stopWords, stopWordsFile| Constructor and Description |
|---|
TextStringDocument(java.lang.String string,
boolean stem)
Create a simple Document for this string
|
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
getNextCandidateToken()
Get the next token from this string
|
static void |
main(java.lang.String[] args)
For testing, print the bag-of-words vector for the given string
|
allLetters, hashMapVector, hasMoreTokens, loadStopWords, nextToken, numberOfTokens, prepareNextToken, printVectorpublic static final java.lang.String tokenizerDelim
protected java.util.StringTokenizer tokenizer
public TextStringDocument(java.lang.String string,
boolean stem)
protected java.lang.String getNextCandidateToken()
getNextCandidateToken in class Documentpublic static void main(java.lang.String[] args)
throws java.io.IOException
java.io.IOException