pythainlp.word_vector

The word_vector.thai2vec contains functions that makes use of a pre-trained vector public data.

Dependencies

Installation of numpy and gensim is required.

Modules

pythainlp.word_vector.thai2vec.get_model()[source]
Returns

Downloads the gensim model.

pythainlp.word_vector.thai2vec.most_similar_cosmul(positive, negative)[source]

การใช้งาน input list

pythainlp.word_vector.thai2vec.doesnt_match(listdata)[source]
pythainlp.word_vector.thai2vec.similarity(word1, word2)[source]
Parameters
  • word1 (str) – first word

  • word2 (str) – second word

Returns

the cosine similarity between the two word vectors

pythainlp.word_vector.thai2vec.sentence_vectorizer(ss, dim=300, use_mean=False)[source]
pythainlp.word_vector.thai2vec.about()[source]