the word embedding vector set
VectorModel
01 Syntax
Microsoft.VisualBasic.Data.NLP.Word2Vec.VectorModel
02 Methods
| Name | Overloads | Summary |
|---|---|---|
| .ctor | 1 | 私有构造函数 |
| similar | 2 | |
| analogy | 1 | 词迁移,即word1 - word0 + word2 的结果,若三个词中有一个不在模型中, 也就是没有词向量,则返回空集 |
| getWordVector | 1 | |
| ToString | 1 | |
| GenericEnumerator | 1 |
03 Properties
| Name | Overloads | Summary |
|---|---|---|
| wordMap | 1 | the word embedding vector set |
| vectorSize | 1 | the number of features, or the dimension of the word embedding vector |
| words | 1 | the number of the word tokens insdie the VectorModel.wordMap. |
| tokens | 1 |
04 Members
#ctor(
IDictionary(Of String, Single()), Int32)私有构造函数
Parameters
| Name | Type | Description |
|---|---|---|
wordMap | IDictionary(Of String, Single()) | 词向量哈希表 |
vectorSize | Int32 | 词向量长度 |
similar(
String, Int32)获取与词word最相近topNSize个词
Parameters
| Name | Type | Description |
|---|---|---|
queryWord | String | 词 |
topNSize | Int32 | 获取最相似词的数量 |
Returns
相近词集,若模型不包含词word,则返回空集
similar(
Single(), Int32)Parameters
| Name | Type | Description |
|---|---|---|
center | Single() | - |
topNSize | Int32 | 获取最相似词的数量 |
analogy(
String, String, String, Int32)词迁移,即word1 - word0 + word2 的结果,若三个词中有一个不在模型中, 也就是没有词向量,则返回空集
Parameters
| Name | Type | Description |
|---|---|---|
word0 | String | 词 |
word1 | String | 词 |
word2 | String | 词 |
topNSize | Int32 | 获取最相似词的数量 |
Returns
与结果最相近的前topNSize个词
wordMap
the word embedding vector set
vectorSize
the number of features, or the dimension of the word embedding vector
words
the number of the word tokens insdie the VectorModel.wordMap.
tokens
getWordVector(
String)ToString()
GenericEnumerator()