Questions tagged [synset]

15 questions
3
votes
1 answer

Imagenet ILSVRC2014 validation ground truth to synset label translation not accurate

Im using a pre-trained image classifier to evaluate input data treatments. I downloaded the ImageNet ILSVRC2014 CLS-LOC validation dataset to use as base. I need to know the actual classes of the images to evaluate my treatments (need to detect…
Luxenalex
  • 31
  • 3
3
votes
0 answers

How to find particular WordNet synset based on the meaning of the word in a sentence?

I'm trying to generate all synonyms of particular sentence using NLTK Python library. My idea is to perform POS tagging, than generate synonyms of all the words in the sentence based on POS tag and then recursively create all possible combinations…
Curious
  • 154
  • 1
  • 8
3
votes
0 answers

Integrate Wordnet to C# application

I'm building a c#.Net desktop application that does indexing and searches using Lucene based on a collection that I have. This requires me to get synonyms for certain words. So I want to use Wordnet to get the synonyms of those words. After…
Visahan
  • 1,130
  • 2
  • 14
  • 35
3
votes
1 answer

What's the difference between part_meronyms and member_meronyms in WordNet from NLTK?

I've been playing around with the NLTK WordNet package but was quite confused with the different methods for Synsets. I understand the meaning of meronym / holonyms and hypernym / hyponyms. But in NLTK WordNet, there are part_meronyms and…
peidaqi
  • 673
  • 1
  • 7
  • 18
1
vote
3 answers

Using WordNet to find out whether two words are synonyms of each other

I'm having troubles with the loop. I need it to print 'synonyms' just once if any of the lemmas of that sense match with word2, otherwise 'not synonyms', but only once. from nltk.corpus import wordnet as wn word1 = 'motorcar' word2 =…
1
vote
1 answer

Lowest common hypernyms shared by a set of words

Given a set of 10 words (["dog", "cat", "rabbit" .... ]) I'd like to find the lowest common hypernym if there's one. I know that WordNet lets you find one between two synsets, but what would be a good way to find it among multiple words? My problem…
iLikeKFC
  • 169
  • 13
1
vote
1 answer

NameError: name 'synset' is not defined

From previous question, I get this code print("Array..............\n\n") tagged=np.array(df['tagged_texts']) temp = [] for x in tagged: for y in x: temp.append(y) tagged = temp print(tagged) pos=neg=obj=count=0 for word, tag in…
Nadina
  • 185
  • 1
  • 1
  • 8
1
vote
2 answers

Convert list of string to list of synsets

Convert List of String to List of objects of type synset. I have tried to split and add but was not able to type cast it to sysnet type. inp="[Synset<'history.n.02'>,Synset<'long.n.02'>]" I should get output as …
0
votes
0 answers

'Synset' object has no attribute 'path_similarity'

I'm attempting to do one of the assignments in Text Mining class offered by Coursera. Basically, I'm trying to write a function that returns the normalized similarity score of a list of synsets (s1) onto another list of synsets (s2). Additionally,…
Anne
  • 1
  • 2
0
votes
1 answer

Merging lists into one as a function output

I created a variable containing a string, and created a function to iterate over each word of this string, to find the corresponding synonyms and return it to a list: import itertools str_1 = "Help, Describe, AI, biology, data, machine learning,…
Zion
  • 47
  • 9
0
votes
0 answers

how can i link the properties from my ontology to synonyms

i made an ontology and i want to link the properties to synonyms so that when i query it by sparql i can get result for example when i query: "SELECT * WHERE{ " +"{?x rdfs:subClassOf ?y." +"?y owl:onProperty…
0
votes
0 answers

How to find Synset name from a json input file in Wordnet python

I am trying to get the Synset name for each word in a dictionary.json file. I have tried the following: import nltk import json from nltk.corpus import wordnet as wn f = open('dictionary_raw.json',) data = json.load(f) for i in data: syn =…
youngdev
  • 535
  • 2
  • 7
  • 15
0
votes
1 answer

Get the synonyms out of a dataframe

I have a dataset that is comprised of {question, answer} for a chatbot training, I loaded it with pandas. I'm trying to get a bag of synonyms for each word in each question with wordnet.synsets. and I'am having some difficulities doing so, here is…
Hai.ha
  • 15
  • 4
0
votes
1 answer

How to analyze nouns in a list

I would like to know if there is a way to analyze nouns in a list. For example, if there is an algorithm that discern different categories, so like if the noun is part of the category "animal", "plants", "nature" and so on. I thought it was possible…
user9355680
  • 87
  • 1
  • 14
0
votes
1 answer

how to use WordNet in C#?

I want to find out synonyms of a specific word Like "help". The synonyms of help are "aid", "assist" or "assistance" etc. I have downloaded the Wordnet library and used this in Visual Studio. Create new project Download library of Wordnet using…