How to get synonyms sorted by probability of their appearance from Wordnet

I am looking in Wordnet for synonyms for a large list of words. The way I did it, when a word has more than one synonym, the results are returned in alphabetical order. I need them to be ordered by their probability of occurrence , and I would take only the first synonym.

I used the proog wordnet and Syns2Index database to convert it to an index like Lucene to query for synonyms. Is there a way to get them to sort by their probabilities this way, or should I use a different approach?

Speed ​​is not important, this synonym search will not be performed online.

+3
source share
2

, ( , ).

Lucene , , , , . I.e., :

class Synonym {
public:
    String name;
    double probability;
    String meaning;
}

Map<String, Synonym> m = new HashMap<String, Synonym>();

... Lucene.

0

Source: https://habr.com/ru/post/1754350/


All Articles