Class

org.clulab.odin.impl

EmbeddingsResource

Related Doc: package impl

Permalink

class EmbeddingsResource extends SanitizedWordEmbeddingMap with OdinResource

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. EmbeddingsResource
  2. OdinResource
  3. SanitizedWordEmbeddingMap
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new EmbeddingsResource(is: InputStream)

    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. def avgSimilarity(t1: Iterable[String], t2: Iterable[String]): Double

    Permalink

    Finds the average embedding similarity between any two words in these two texts IMPORTANT: words here must be words not lemmas!

    Finds the average embedding similarity between any two words in these two texts IMPORTANT: words here must be words not lemmas!

    Definition Classes
    SanitizedWordEmbeddingMap
  6. def avgSimilarityReturnTop(t1: Iterable[String], t2: Iterable[String]): (Double, Array[(Double, String, String)])

    Permalink
    Definition Classes
    SanitizedWordEmbeddingMap
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. lazy val dimensions: Int

    Permalink
    Definition Classes
    SanitizedWordEmbeddingMap
  9. final def eq(arg0: AnyRef): Boolean

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  13. def getEmbedding(w: String): Option[Array[Double]]

    Permalink

    If the word doesn't exist in the lexicon, try to use UNK

    If the word doesn't exist in the lexicon, try to use UNK

    Definition Classes
    SanitizedWordEmbeddingMap
  14. def getWordVector(word: String): Option[Array[Double]]

    Permalink

    Fetches the embeddings vector for a given word (not lemma)

    Fetches the embeddings vector for a given word (not lemma)

    word

    The word

    returns

    the array of embeddings weights

    Definition Classes
    SanitizedWordEmbeddingMap
  15. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  16. def interpolate(wordsAndWeights: Iterable[(String, Double)]): Array[Double]

    Permalink

    for a sequence of (word, weight) pairs, interpolate the vectors corresponding to the words by their respective weights, and normalize the resulting vector

    for a sequence of (word, weight) pairs, interpolate the vectors corresponding to the words by their respective weights, and normalize the resulting vector

    Definition Classes
    SanitizedWordEmbeddingMap
  17. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  18. def logMultiplicativeSanitizedTextSimilarity(t1: Iterable[String], t2: Iterable[String], method: Symbol = Symbol("linear"), normalize: Boolean = false): Double

    Permalink
    Definition Classes
    SanitizedWordEmbeddingMap
  19. def logMultiplicativeTextSimilarity(t1: Iterable[String], t2: Iterable[String], method: Symbol = Symbol("linear"), normalize: Boolean = false): Double

    Permalink
    Definition Classes
    SanitizedWordEmbeddingMap
  20. def makeCompositeVector(t: Iterable[String]): Array[Double]

    Permalink
    Definition Classes
    SanitizedWordEmbeddingMap
  21. val matrix: Map[String, Array[Double]]

    Permalink
    Definition Classes
    SanitizedWordEmbeddingMap
  22. def maxSimilarity(t1: Iterable[String], t2: Iterable[String]): Double

    Permalink

    Finds the maximum embedding similarity between any two words in these two texts IMPORTANT: IMPORTANT: t1, t2 must be arrays of words, not lemmas!

    Finds the maximum embedding similarity between any two words in these two texts IMPORTANT: IMPORTANT: t1, t2 must be arrays of words, not lemmas!

    Definition Classes
    SanitizedWordEmbeddingMap
  23. def minSimilarity(t1: Iterable[String], t2: Iterable[String]): Double

    Permalink
    Definition Classes
    SanitizedWordEmbeddingMap
  24. def mostSimilarWords(word: String, howMany: Int, filterPredicate: Option[(String) ⇒ Boolean] = None): List[(String, Double)]

    Permalink
    Definition Classes
    SanitizedWordEmbeddingMap
  25. def mostSimilarWords(words: Set[String], howMany: Int): List[(String, Double)]

    Permalink

    Finds the words most similar to this set of inputs IMPORTANT: words here must already be normalized using Word2vec.sanitizeWord()!

    Finds the words most similar to this set of inputs IMPORTANT: words here must already be normalized using Word2vec.sanitizeWord()!

    Definition Classes
    SanitizedWordEmbeddingMap
  26. def mostSimilarWords(v: Array[Double], howMany: Int, filterPredicate: Option[(String) ⇒ Boolean]): List[(String, Double)]

    Permalink

    filterPredicate: if passed, only returns words that match the predicate

    filterPredicate: if passed, only returns words that match the predicate

    Definition Classes
    SanitizedWordEmbeddingMap
  27. def multiplicativeSanitizedTextSimilarity(t1: Iterable[String], t2: Iterable[String]): Double

    Permalink

    Similar to sanitizedTextSimilarity, but but using the multiplicative heuristic of Levy and Goldberg (2014) IMPORTANT: words here must already be normalized using sanitizeWord()!

    Similar to sanitizedTextSimilarity, but but using the multiplicative heuristic of Levy and Goldberg (2014) IMPORTANT: words here must already be normalized using sanitizeWord()!

    returns

    Similarity value

    Definition Classes
    SanitizedWordEmbeddingMap
  28. def multiplicativeTextSimilarity(t1: Iterable[String], t2: Iterable[String]): Double

    Permalink

    Similar to textSimilarity, but using the multiplicative heuristic of Levy and Goldberg (2014) IMPORTANT: t1, t2 must be arrays of words, not lemmas!

    Similar to textSimilarity, but using the multiplicative heuristic of Levy and Goldberg (2014) IMPORTANT: t1, t2 must be arrays of words, not lemmas!

    Definition Classes
    SanitizedWordEmbeddingMap
  29. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  32. def sanitizedAvgSimilarity(t1: Iterable[String], t2: Iterable[String]): (Double, ArrayBuffer[(Double, String, String)])

    Permalink

    Finds the average embedding similarity between any two words in these two texts IMPORTANT: words here must already be normalized using sanitizeWord()! Changelog: (Peter/June 4/2014) Now returns words list of pairwise scores, for optional answer justification.

    Finds the average embedding similarity between any two words in these two texts IMPORTANT: words here must already be normalized using sanitizeWord()! Changelog: (Peter/June 4/2014) Now returns words list of pairwise scores, for optional answer justification.

    Definition Classes
    SanitizedWordEmbeddingMap
  33. def sanitizedMaxSimilarity(t1: Iterable[String], t2: Iterable[String]): Double

    Permalink

    Finds the maximum embedding similarity between any two words in these two texts IMPORTANT: words here must already be normalized using sanitizeWord()!

    Finds the maximum embedding similarity between any two words in these two texts IMPORTANT: words here must already be normalized using sanitizeWord()!

    Definition Classes
    SanitizedWordEmbeddingMap
  34. def sanitizedMinSimilarity(t1: Iterable[String], t2: Iterable[String]): Double

    Permalink

    Finds the minimum embedding similarity between any two words in these two texts IMPORTANT: words here must already be normalized using Word2vec.sanitizeWord()!

    Finds the minimum embedding similarity between any two words in these two texts IMPORTANT: words here must already be normalized using Word2vec.sanitizeWord()!

    Definition Classes
    SanitizedWordEmbeddingMap
  35. def sanitizedTextSimilarity(t1: Iterable[String], t2: Iterable[String]): Double

    Permalink

    Computes the cosine similarity between two texts, according to the embedding matrix IMPORTANT: words here must already be normalized using Word2vec.sanitizeWord()!

    Computes the cosine similarity between two texts, according to the embedding matrix IMPORTANT: words here must already be normalized using Word2vec.sanitizeWord()!

    Definition Classes
    SanitizedWordEmbeddingMap
  36. def saveMatrix(mf: String): Unit

    Permalink
    Definition Classes
    SanitizedWordEmbeddingMap
  37. def similarity(w1: String, w2: String): Double

    Permalink

    Computes the similarity between two given words IMPORTANT: words here must already be normalized using Word2vec.sanitizeWord()!

    Computes the similarity between two given words IMPORTANT: words here must already be normalized using Word2vec.sanitizeWord()!

    w1

    The first word

    w2

    The second word

    returns

    The cosine similarity of the two corresponding vectors

    Definition Classes
    EmbeddingsResourceSanitizedWordEmbeddingMap
  38. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  39. def textSimilarity(t1: Iterable[String], t2: Iterable[String]): Double

    Permalink

    Computes the cosine similarity between two texts, according to the embedding matrix IMPORTANT: t1, t2 must be arrays of words, not lemmas!

    Computes the cosine similarity between two texts, according to the embedding matrix IMPORTANT: t1, t2 must be arrays of words, not lemmas!

    Definition Classes
    SanitizedWordEmbeddingMap
  40. def toString(): String

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

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

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

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

Inherited from OdinResource

Inherited from SanitizedWordEmbeddingMap

Inherited from AnyRef

Inherited from Any

Ungrouped