tvecs.visualization package

Submodules

tvecs.visualization.server module

CherryPy Server to provide recommendations of semantic similarity.

class tvecs.visualization.server.Server[source]

Bases: object

Server Configuration for t-vex.

See also

  • cherrypy

cross_lingual()[source]

Cross Lingual recommender html returned.

distances()[source]

Visualization with distances html returned.

get_cross_lingual_recommendations(lang1, lang2, word, topn=10)[source]

Provide cross lingual recommendations.

API Documentation
param lang1

Language 1 for cross lingual recommendations.

param lang2

Language 2 for cross lingual recommendations.

param word

Word utilised for cross lingual recommendations.

param topn

No of recommendations provided.

type lang1

String

type lang2

String

type word

String

type topn

Integer

return

List of recommendations

rtype

List

get_distance(word1, word2, language1, language2)[source]

Retrieve cosine distance between word1 and word2.

  • word1 and word2 have to be in the vocabulary of language1 and language2, respectively.

API Documentation
param word1

A word in language1’s vocabulary

param language1

Language of word1

param word2

A word in language2’s vocabulary

param language2

Language of word2

type word1

String

type language1

String

type word2

String

type language2

String

return

Dictionary with keys ‘word1’, ‘word2’, and ‘distance’

rtype

Dictionary

index()[source]

Semantic spac visualization html returned.

lingual_semantics()[source]

Semantically related words in same language returned.

multivariate_analysis()[source]

Parallel Coordinates for multivariate analysis html page return.

retrieve_meaning(language, word)[source]

Optional: Translate the word.

Retrieve Eng definition(s) of a word from cached file or PyDictionary.

API Documentation
param language

Language for which definition needed

param word

Word whose definition needs to be retrieved

type language

String

type word

String

return

word and definition

rtype

String

retrieve_recommendations(language, word, limit=10)[source]

Retrieve number of semantically similar recommendations.

  • For specified word in the given lang retrieve limit recommendations

API Documentation
param language

Language for which recommendations required

param word

Semantic similar words provided for given word

param limit

No of words to be recommended [ Default 10 ]

type language

String

type word

String

type limit

Integer

return

List of recommendations

rtype

List

See also

  • gensim.models.Word2Vec

Module contents