Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/chrisjmccormick/word2vec_commented
/ functions
Functions
33 in github.com/chrisjmccormick/word2vec_commented
⨍
Functions
33
◇
Types & classes
2
↓ 17 callers
Function
ArgPos
word2vec.c:1460
↓ 5 callers
Function
ArgPos
word2phrase.c:552
↓ 5 callers
Function
SearchVocab
Returns position of a word in the vocabulary; if the word is not found, returns -1
word2phrase.c:118
↓ 4 callers
Function
GetWordHash
* ======== GetWordHash ======== * Returns hash value of a word. The hash is an integer between 0 and * vocab_hash_size (default is 30E6). * * For
word2vec.c:257
↓ 4 callers
Function
GetWordHash
* ======== GetWordHash ======== * Returns hash value of a word. The hash is an integer between 0 and * vocab_hash_size (default is 30E6). * * For
word2phrase.c:110
↓ 3 callers
Function
AddWordToVocab
* ======== AddWordToVocab ======== * Adds a new word to the vocabulary (one that hasn't been seen yet). */
word2vec.c:308
↓ 3 callers
Function
AddWordToVocab
* ======== AddWordToVocab ======== * Adds a new word to the vocabulary (one that hasn't been seen yet). */
word2phrase.c:140
↓ 3 callers
Function
ReadWord
* ======== ReadWord ======== * Reads a single word from a file, assuming space + tab + EOL to be word * boundaries. * * Parameters: * word - A
word2vec.c:203
↓ 3 callers
Function
ReadWord
* ======== ReadWord ======== * Reads a single word from a file, assuming space + tab + EOL to be word * boundaries. * * NOTE: This function is id
word2phrase.c:56
↓ 2 callers
Function
SearchVocab
* ======== SearchVocab ======== * Lookup the index in the 'vocab' table of the given 'word'. * Returns -1 if the word is not found. * This function
word2vec.c:270
↓ 2 callers
Function
SortVocab
* ======== SortVocab ======== * Sorts the vocabulary by frequency using word counts, and removes words that * occur fewer than 'min_count' times in
word2vec.c:360
↓ 1 callers
Function
CreateBinaryTree
* ======== CreateBinaryTree ======== * Create binary Huffman tree using the word counts. * Frequent words will have short unique binary codes. * Hu
word2vec.c:446
↓ 1 callers
Function
InitNet
* ======== InitNet ======== * */
word2vec.c:737
↓ 1 callers
Function
InitUnigramTable
* ======== InitUnigramTable ======== * This table is used to implement negative sampling. * Each word is given a weight equal to it's frequency (wor
word2vec.c:142
↓ 1 callers
Function
LearnVocabFromTrainFile
* ======== LearnVocabFromTrainFile ======== * Builds a vocabulary from the words found in the training file. * * This function will also build a ha
word2vec.c:617
↓ 1 callers
Function
LearnVocabFromTrainFile
* ======== LearnVocabFromTrainFile ======== * Builds a vocabulary from the words found in the training file. * * This function will also build a ha
word2phrase.c:267
↓ 1 callers
Function
ReadVocab
word2vec.c:700
↓ 1 callers
Function
ReadWordIndex
* ======== ReadWordIndex ======== * Reads the next word from the training file, and returns its index into the * 'vocab' table. */
word2vec.c:297
↓ 1 callers
Function
ReduceVocab
Reduces the vocabulary by removing infrequent tokens
word2vec.c:414
↓ 1 callers
Function
ReduceVocab
Reduces the vocabulary by removing infrequent tokens
word2phrase.c:237
↓ 1 callers
Function
SaveVocab
word2vec.c:693
↓ 1 callers
Function
SortVocab
* ======== SortVocab ======== * Sorts the vocabulary by frequency using word counts, and removes words that * occur fewer than 'min_count' times in
word2phrase.c:195
↓ 1 callers
Function
TrainModel
* ======== TrainModel ======== * Main entry point to the training process. */
word2vec.c:1367
↓ 1 callers
Function
TrainModel
* ======== TrainModel ======== * Main body of this tool. * * This function performs the phrase detection and simultaneously generates a * new tra
word2phrase.c:416
Function
ReadWordIndex
Reads a word and returns its index in the vocabulary
word2phrase.c:129
Function
TrainModelThread
* ======== TrainModelThread ======== * This function performs the training of the model. */
word2vec.c:785
Function
VocabCompare
Used later for sorting by word counts
word2vec.c:349
Function
VocabCompare
Used later for sorting by word counts
word2phrase.c:181
Function
main
word-analogy.c:24
Function
main
distance.c:24
Function
main
word2vec.c:1472
Function
main
word2phrase.c:564
Function
main
compute-accuracy.c:26