train/swe_with_2nd_randomwalk.c
// Returns hash value of a word
Returns hash value of a word
Returns hash value of a word
int GetWordHash(char *word) {
    unsigned long long a, hash = 0;
    for (a = 0; a < strlen(word); a++) hash = hash * 257 + word[a];
    hash = hash % vocab_hash_size;
    return hash;
}
int GetWordHash ( char * word ) { unsigned long long a , hash = 0 ; for ( a = 0 ; a < strlen ( word ) ; a ++ ) hash = hash * 257 + word [ a ] ; hash = hash % vocab_hash_size ; return hash ; }
Returns hash value of a word
Returns hash value of a word