Object/Class

com.intel.analytics.zoo.models.textclassification

TextClassifier

Related Docs: class TextClassifier | package textclassification

Permalink

object TextClassifier extends Serializable

Linear Supertypes
Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TextClassifier
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def apply[T](classNum: Int, embeddingFile: String, wordIndex: Map[String, Int] = null, sequenceLength: Int = 500, encoder: String = "cnn", encoderOutputDim: Int = 256)(implicit arg0: ClassTag[T], ev: TensorNumeric[T]): TextClassifier[T]

    Permalink

    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.

    T

    Numeric type of parameter(e.g. weight, bias). Only support float/double now.

    classNum

    The number of text categories to be classified. Positive integer.

    embeddingFile

    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/.

    wordIndex

    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.

    sequenceLength

    The length of a sequence. Positive integer. Default is 500.

    encoder

    The encoder for input sequences. String. "cnn" or "lstm" or "gru" are supported. Default is "cnn".

    encoderOutputDim

    The output dimension for the encoder. Positive integer. Default is 256.

  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  11. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  12. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  13. def loadModel[T](path: String, weightPath: String = null)(implicit arg0: ClassTag[T], ev: TensorNumeric[T]): TextClassifier[T]

    Permalink

    Load an existing TextClassifier model (with weights).

    Load an existing TextClassifier model (with weights).

    T

    Numeric type of parameter(e.g. weight, bias). Only support float/double now.

    path

    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".

    weightPath

    The path for pre-trained weights if any. Default is null.

  14. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  15. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  16. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  18. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  19. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def apply[T](classNum: Int, tokenLength: Int, sequenceLength: Int, encoder: String, encoderOutputDim: Int)(implicit arg0: ClassTag[T], ev: TensorNumeric[T]): TextClassifier[T]

    Permalink

    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.

    Annotations
    @deprecated
    Deprecated

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped