public class Windows extends Object
| Constructor and Description |
|---|
Windows() |
| Modifier and Type | Method and Description |
|---|---|
static Window |
windowForWordInPosition(int windowSize,
int wordPos,
List<String> sentence)
Creates a sliding window from text
|
static List<Window> |
windows(InputStream words,
int windowSize)
Constructs a list of window of size windowSize.
|
static List<Window> |
windows(InputStream words,
TokenizerFactory tokenizerFactory,
int windowSize)
Constructs a list of window of size windowSize.
|
static List<Window> |
windows(List<String> words,
int windowSize)
Constructs a list of window of size windowSize
|
static List<Window> |
windows(String words)
Constructs a list of window of size windowSize.
|
static List<Window> |
windows(String words,
int windowSize)
Constructs a list of window of size windowSize.
|
static List<Window> |
windows(String words,
TokenizerFactory tokenizerFactory)
Constructs a list of window of size windowSize.
|
static List<Window> |
windows(String words,
TokenizerFactory tokenizerFactory,
int windowSize)
Constructs a list of window of size windowSize.
|
public static List<Window> windows(InputStream words, int windowSize)
words - the words to tokenize and construct windows fromwindowSize - the window size to generatepublic static List<Window> windows(InputStream words, TokenizerFactory tokenizerFactory, int windowSize)
words - the words to tokenize and construct windows fromtokenizerFactory - tokenizer factory to usewindowSize - the window size to generatepublic static List<Window> windows(String words, int windowSize)
words - the words to tokenize and construct windows fromwindowSize - the window size to generatepublic static List<Window> windows(String words, TokenizerFactory tokenizerFactory, int windowSize)
words - the words to tokenize and construct windows fromtokenizerFactory - tokenizer factory to usewindowSize - the window size to generatepublic static List<Window> windows(String words)
words - the words to tokenize and construct windows frompublic static List<Window> windows(String words, TokenizerFactory tokenizerFactory)
words - the words to tokenize and construct windows fromtokenizerFactory - tokenizer factory to usepublic static Window windowForWordInPosition(int windowSize, int wordPos, List<String> sentence)
windowSize - the window size to usewordPos - the position of the word to centersentence - the sentence to createComplex a window forCopyright © 2014. All rights reserved.