java.io.Serializable
, OptionHandler
public class CSVEmbeddingHandler extends EmbeddingHandler
Modifier and Type | Field | Description |
---|---|---|
static java.lang.String |
RESOURCES_FOLDER_NAME |
Default path to where resources are stored.
|
Constructor | Description |
---|---|
CSVEmbeddingHandler() |
Modifier and Type | Method | Description |
---|---|---|
void |
createDict() |
initializes the dictionary
|
java.io.File |
getEmbeddingsFile() |
|
java.lang.String |
getSeparator() |
|
java.lang.String |
getWordNameIndex() |
|
java.lang.String |
globalInfo() |
Returns a string describing this filter.
|
void |
setEmbeddingsFile(java.io.File embeddingsFile) |
|
void |
setSeparator(java.lang.String separator) |
|
void |
setWordNameIndex(java.lang.String wordNameIndex) |
getDimensions, getOptions, getWordMap, listOptions, setOptions
public static java.lang.String RESOURCES_FOLDER_NAME
public java.lang.String globalInfo()
public void createDict() throws java.lang.Exception
EmbeddingHandler
createDict
in class EmbeddingHandler
java.lang.Exception
- in case of wrong file@OptionMetadata(displayName="embeddingsFile", description="The file name containing the word vectors. It has to be a gzip compressed csv file", commandLineParamName="K", commandLineParamSynopsis="-K <string>", displayOrder=1) public java.io.File getEmbeddingsFile()
public void setEmbeddingsFile(java.io.File embeddingsFile)
@OptionMetadata(displayName="separator", description="The string to use as separator for the columns (you can use \'TAB\' or \'\\t\' for the TAB symbol). \t Default:TAB", commandLineParamName="sep", commandLineParamSynopsis="-sep <string>", displayOrder=2) public java.lang.String getSeparator()
public void setSeparator(java.lang.String separator)
@OptionMetadata(displayName="wordNameIndex", description="The index (starting from 1) of the word string in the file. First and last are valid values. ", commandLineParamName="I", commandLineParamSynopsis="-I <col>", displayOrder=0) public java.lang.String getWordNameIndex()
public void setWordNameIndex(java.lang.String wordNameIndex)