Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Lexicon dictionary for synonym words

There are few dictionaries available for natural language processing. Like positive, negative words dictionaries etc.

Is there any dictionary available which contains list of synonym for all dictionary words?

Like for nice

synonyms: enjoyable, pleasant, pleasurable, agreeable, delightful, satisfying, gratifying, acceptable, to one's liking, entertaining, amusing, diverting, marvellous, good; 
like image 526
Programming_crazy Avatar asked May 17 '14 10:05

Programming_crazy


People also ask

What is the best dictionary for synonyms?

The thesaurus is more than just a list of synonyms; it is your guide to more precise and effective use of language.

What do you call a dictionary for synonyms?

A dictionary of synonyms and antonyms (or opposites), such as Thesaurus.com, is called a thesaurus.

What is synonymous dictionary?

adjective. syn·​on·​y·​mous sə-ˈnä-nə-məs. : having the character of a synonym. also : alike in meaning or significance. : having the same connotations, implications, or reference.

What is lexicon and example?

A lexicon is the vocabulary of a language or subject. "No-hitter," "go-ahead run," and "Baltimore chop" are part of the baseball lexicon. Lexicons are really dictionaries, though a lexicon usually covers an ancient language or the special vocabulary of a particular author or field of study.


1 Answers

Although WordNet is a good resource to start for finding synonym, one must note its limitations, here's an example with python API in NLTK library:

Firstly, words have multiple meanings (i.e. senses):

>>> from nltk.corpus import wordnet as wn
>>> wn.synsets('nice')
[Synset('nice.n.01'), Synset('nice.a.01'), Synset('decent.s.01'), Synset('nice.s.03'), Synset('dainty.s.04'), Synset('courteous.s.01')]

And to access the correct sense of a word, you will need to know the correct sense of a word given a context.

>>> wn.synset('nice.a.01').definition()
u'pleasant or pleasing or agreeable in nature or appearance'

You can try Word Sense Disambiguation software but they are not perfect (see Anyone know of some good Word Sense Disambiguation software?). Even if you know the sense of the word, the entries of wordnet are limited. You cannot expect much:

>>> wn.synset('nice.a.01').lemma_names()
[u'nice']
>>> wn.synset('nice.a.01').similar_tos()
[Synset('good.s.06'), Synset('pleasant.s.02')]
>>> [i.lemma_names() for i in wn.synset('nice.a.01').similar_tos()]
[[u'good'], [u'pleasant']]
like image 145
alvas Avatar answered Sep 28 '22 14:09

alvas