Wordnet Find Synonyms

前端 未结 4 1166
小鲜肉
小鲜肉 2020-12-23 10:44

I am searching for a way to find all the synonyms of a particular word using wordnet. I am using JAWS.

For example:

love(v):

4条回答
  •  佛祖请我去吃肉
    2020-12-23 11:32

    First we have to ask the questions "What is synonym?", "Can synonyms be queried from the surface/root word?".

    In WordNet, you have similar words representing the same concept under this term call the Synset and not at the surface word level.

    To get synset's synonyms in the coverage of your example, you would require more than wordnet, possibly some semantic similarity methods to extract the other words.

    I couldn't give you a JAWS explanation of what i mean above but from WordNet in NLTK interface for python. You can see that WN is insufficient for the coverage you want.

    from nltk.corpus import wordnet as wn
    for ss in wn.synsets('love'): # Each synset represents a diff concept.
      print ss.definition
      print ss.lemma_names
      print
    

    Code above outputs:

    a strong positive emotion of regard and affection
    ['love']
    
    any object of warm affection or devotion; 
    ['love', 'passion']
    
    a beloved person; used as terms of endearment
    ['beloved', 'dear', 'dearest', 'honey', 'love']
    
    a deep feeling of sexual desire and attraction
    ['love', 'sexual_love', 'erotic_love']
    
    a score of zero in tennis or squash
    ['love']
    
    sexual activities (often including sexual intercourse) between two people
    ['sexual_love', 'lovemaking', 'making_love', 'love', 'love_life']
    
    have a great affection or liking for
    ['love']
    
    get pleasure from
    ['love', 'enjoy']
    
    be enamored or in love with
    ['love']
    
    have sexual intercourse with
    ['sleep_together', 'roll_in_the_hay', 'love', 'make_out', 'make_love', 'sleep_with', 'get_laid', 'have_sex', 'know', 'do_it', 'be_intimate', 'have_intercourse', 'have_it_away', 'have_it_off', 'screw', 'fuck', 'jazz', 'eff', 'hump', 'lie_with', 'bed', 'have_a_go_at_it', 'bang', 'get_it_on', 'bonk']
    

提交回复
热议问题