com.intel.analytics.zoo.models.textclassification
The factory method to create a TextClassifier instance with WordEmbedding as its first layer.
The factory method to create a TextClassifier instance with WordEmbedding as its first layer.
Numeric type of parameter(e.g. weight, bias). Only support float/double now.
The number of text categories to be classified. Positive integer.
The path to the word embedding file. Currently only the following GloVe files are supported: "glove.6B.50d.txt", "glove.6B.100d.txt", "glove.6B.200d.txt", "glove.6B.300d.txt", "glove.42B.300d.txt", "glove.840B.300d.txt". You can download from: https://nlp.stanford.edu/projects/glove/.
Map of word (String) and its corresponding index (integer). The index is supposed to start from 1 with 0 reserved for unknown words. During the prediction, if you have words that are not in the wordIndex for the training, you can map them to index 0. Default is null. In this case, all the words in the embeddingFile will be taken into account and you can call WordEmbedding.getWordIndex(embeddingFile) to retrieve the map.
The length of a sequence. Positive integer. Default is 500.
The encoder for input sequences. String. "cnn" or "lstm" or "gru" are supported. Default is "cnn".
The output dimension for the encoder. Positive integer. Default is 256.
Load an existing TextClassifier model (with weights).
Load an existing TextClassifier model (with weights).
Numeric type of parameter(e.g. weight, bias). Only support float/double now.
The path for the pre-defined model. Local file system, HDFS and Amazon S3 are supported. HDFS path should be like "hdfs://[host]:[port]/xxx". Amazon S3 path should be like "s3a://bucket/xxx".
The path for pre-trained weights if any. Default is null.
The factory method to create a TextClassifier instance that takes word vectors as input.
The factory method to create a TextClassifier instance that takes word vectors as input.