Closed barskern closed 1 year ago
Hi @barskern , mthesaur organizes groups of words with similar meanings. So the target word may not be the first word in the word list.
Then again, a single word may have many meanings. So technically a word may appear in multiple rows instead of one. Looking at the logic now, this function only retrieve the synonym of a word for its first appearing meaning group.
Since this thesaurus plugin already support multiple meaning groups, let me change its logic to include all its meaning groups.
@barskern , I have made the change, though... the result is for common words with a lot of meaning groups, the result can be horrendously huge.
In the plugin, we have two parameters that may reduce the pain of overly abundant result, g:tq_truncation_on_definition_num
and g:tq_truncation_on_syno_list_size
.
For example, if you use
let g:tq_truncation_on_definition_num = 10
let g:tq_truncation_on_syno_list_size = 20
the number of returned value will be much more manageable, though there is risk that some useful results are filtered out. Unfortunately, mthesaur does not rank results by relevance.
@Ron89 That was quick feedback, thank you so much. I will give it a go with the changes you implemented here, though the immense amount of suggestions that you outline seem to make this backend quite difficult to use and benefit from. I might simply continue to only use the datamuse_com backend, as it gives good answer, though few to choose from.
Since there is no further update for a few months, I will close this ticket for now.
When the plugin searches for synonyms it returns the first line which contains the word that is queried (see snippet).
https://github.com/Ron89/thesaurus_query.vim/blob/23d8aa3f7d1a785e31e760e1b6b3b4c18abf8332/autoload/thesaurus_query/backends/mthesaur_lookup.py#L33
The way I understood the format of mthesaur is that the "root" word is the first word of the line, so shouldn't this line then be changed to:
The reason I'm posing the question is that I seem to get a lot of "bad" synonyms when I query a word, normally because the word appears in a synonym list of another word where the link is debatable.