Class/Object

org.clulab.lm

RnnLM

Related Docs: object RnnLM | package lm

Permalink

class RnnLM extends LM

Implements a RnnLM inspired by Lample et al. (2016) and ULMFit

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

Instance Constructors

  1. new RnnLM(w2i: Map[String, Int], c2i: Map[Char, Int], wordRnnStateSize: Int, charRnnStateSize: Int, lmLabelCount: Int, parameters: ParameterCollection, wordLookupParameters: LookupParameter, charLookupParameters: LookupParameter, charFwRnnBuilder: RnnBuilder, charBwRnnBuilder: RnnBuilder, wordFwRnnBuilder: RnnBuilder, wordBwRnnBuilder: RnnBuilder, fwO: Parameter, bwO: Parameter)

    Permalink

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. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. val bwO: Parameter

    Permalink
  6. val c2i: Map[Char, Int]

    Permalink
  7. val charBwRnnBuilder: RnnBuilder

    Permalink
  8. val charFwRnnBuilder: RnnBuilder

    Permalink
  9. val charLookupParameters: LookupParameter

    Permalink
  10. val charRnnStateSize: Int

    Permalink
  11. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  12. def dimensions: Int

    Permalink
    Definition Classes
    RnnLMLM
  13. final def eq(arg0: AnyRef): Boolean

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  16. val fwO: Parameter

    Permalink
  17. final def getClass(): Class[_]

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

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

    Permalink
    Definition Classes
    Any
  20. val lmLabelCount: Int

    Permalink
  21. def mkEmbedding(word: String): Expression

    Permalink

    Creates an overall word embedding by concatenating word and character embeddings

  22. def mkEmbeddings(words: Iterable[String], doDropout: Boolean): Iterable[Expression]

    Permalink
    Definition Classes
    RnnLMLM
  23. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  26. val parameters: ParameterCollection

    Permalink
  27. def perplexity(emissionScoresForSeq: ExpressionVector, words: Array[String], t2i: Map[String, Int]): Double

    Permalink

    Computes perplexity for this sentence

  28. def reportPerplexity(devFileName: String, t2i: Map[String, Int]): Unit

    Permalink
  29. def save(baseModelName: String): Unit

    Permalink
  30. def saveX2i(printWriter: PrintWriter): Unit

    Permalink
    Definition Classes
    RnnLMLM
  31. final def synchronized[T0](arg0: ⇒ T0): T0

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

    Permalink
    Definition Classes
    AnyRef → Any
  33. def trainLM(trainFile: String, devFileOpt: Option[String], lmLabelCount: Int, logCheckpoint: Int, saveCheckpoint: Int, batchSize: Int): Unit

    Permalink

    Pretrain this LM for next word prediction, in both directions

    Pretrain this LM for next word prediction, in both directions

    trainFile

    File with one sentence per line; each sentence must be pre-tokenized

    devFileOpt

    Optional development file to report perplexity once in a while

    lmLabelCount

    How many prediction labels to use

    logCheckpoint

    When to printout the cummulative loss

    saveCheckpoint

    When to save a model

    batchSize

    Batch size in sentences; each actual sentences counts as 2 due to the bi traversal

  34. val w2i: Map[String, Int]

    Permalink
  35. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  38. val wordBwRnnBuilder: RnnBuilder

    Permalink
  39. val wordFwRnnBuilder: RnnBuilder

    Permalink
  40. val wordLookupParameters: LookupParameter

    Permalink
  41. val wordRnnStateSize: Int

    Permalink

Inherited from LM

Inherited from AnyRef

Inherited from Any

Ungrouped