Class Window
- java.lang.Object
-
- org.deeplearning4j.text.movingwindow.Window
-
- All Implemented Interfaces:
Serializable
public class Window extends Object implements Serializable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Window(Collection<String> words, int begin, int end)Creates a window with a context of size 3Window(Collection<String> words, int windowSize, int begin, int end)Initialize a window with the given size
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringasTokens()intgetBegin()intgetEnd()StringgetFocusWord()StringgetLabel()intgetMedian()intgetWindowSize()StringgetWord(int i)List<String>getWords()booleanisBeginLabel()booleanisEndLabel()voidsetBegin(int begin)voidsetEnd(int end)voidsetLabel(String label)voidsetWords(List<String> words)StringtoString()
-
-
-
Constructor Detail
-
Window
public Window(Collection<String> words, int begin, int end)
Creates a window with a context of size 3- Parameters:
words- a collection of strings of size 3
-
Window
public Window(Collection<String> words, int windowSize, int begin, int end)
Initialize a window with the given size- Parameters:
words- the words to usewindowSize- the size of the windowbegin- the begin index for the windowend- the end index for the window
-
-
Method Detail
-
asTokens
public String asTokens()
-
getWord
public String getWord(int i)
-
getFocusWord
public String getFocusWord()
-
isBeginLabel
public boolean isBeginLabel()
-
isEndLabel
public boolean isEndLabel()
-
getLabel
public String getLabel()
-
getWindowSize
public int getWindowSize()
-
getMedian
public int getMedian()
-
setLabel
public void setLabel(String label)
-
getBegin
public int getBegin()
-
setBegin
public void setBegin(int begin)
-
getEnd
public int getEnd()
-
setEnd
public void setEnd(int end)
-
-