Getting Started
Get Closest function provides the N closely associated words for the given input string.
Example
# coding:utf-8 from indicLP.preproccessing import Embedding language = "ta" word = "பள்ளி" embedder = Embedding(lang=language) for i in closest: (word, score) = i print(word,round(score,2)) # பாடசாலை 0.87 # உயர்நில் 0.86 # கல்லூரி 0.85 # பாடசால் 0.84 # உயர்நிலைப்பள்ளி 0.81 # மேல்நில் 0.81 # பள்ளிக்கூடம் 0.79 # கல் 0.78 # மாண 0.77 # படிப்பு 0.77
Input Arguments
Following are the input arguments to be provided while using get_closest method:
- word: A string representing the word for which the related words are needed.
Reference Materials
Following are some reference materials for Get Closest Method
- Word Embedding: A reference blogpost discussing the usage of Embedding Class in hardcoded string.
- Stanford RCpedia: RCpedia NLP slides on word embeddings provided by Stanford.