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 String
asTokens()
int
getBegin()
int
getEnd()
String
getFocusWord()
String
getLabel()
int
getMedian()
int
getWindowSize()
String
getWord(int i)
List<String>
getWords()
boolean
isBeginLabel()
boolean
isEndLabel()
void
setBegin(int begin)
void
setEnd(int end)
void
setLabel(String label)
void
setWords(List<String> words)
String
toString()
-
-
-
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)
-
-