object Word2Vec
- Alphabetic
- By Inheritance
- Word2Vec
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- def convertWord(str: String, lowercase: Boolean = false): String
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- val hyphenPattern: Pattern
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def loadBansalVectorsForVocabulary(word2vecPath: String, voc: Set[String], inputVectorBias: Boolean): HashMap[String, Array[Float]]
-
def
loadVectorsForVocabulary(word2vecPath: String, voc: Set[String], inputVectorBias: Boolean): HashMap[String, Array[Float]]
Loads vectors for a vocabulary from word2vec, with OOV words having random vectors generated for them.
- def makeRandomVectorsForVocabulary(voc: Set[String], dim: Int, inputVectorBias: Boolean): HashMap[String, Array[Float]]
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- def readBansalEmbeddings(embeddingsPath: String, words: Set[String], inputVectorBias: Boolean): HashMap[String, Array[Float]]
-
def
readWord2Vec(word2VecPath: String, words: Set[String], inputVectorBias: Boolean): HashMap[String, Array[Float]]
Reads the vectors in words from the given word2vec path and augments with a bias feature if necessary.
Reads the vectors in words from the given word2vec path and augments with a bias feature if necessary. The returned map does not include entries for words that are not in the w2v file.
-
def
smartLoadVectorsForVocabulary(word2vecPaths: Seq[String], voc: Set[String], vocCounts: Counter[String, Double] = Counter[String,Double], maxVectorLen: Int = Int.MaxValue, inputVectorBias: Boolean, randomizeUnks: Boolean = true): HashMap[String, Array[Float]]
Loads vectors from one or more sources in word2vecPaths; these might be in word2vec format (should end in .bin) or C+W/Bansal format (should end in .txt).
Loads vectors from one or more sources in word2vecPaths; these might be in word2vec format (should end in .bin) or C+W/Bansal format (should end in .txt).
For each word, vectors are appended from each source. If at least one source is present, others are zeroes. Otherwise, it gets a random vector.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )