All synonyms are "name" (also: stray commas and lack of new lines) #34

Closed
brianbuccola opened this Issue Feb 19, 2016 · 4 comments

Projects

None yet

5 participants

@brianbuccola

Hi,

Just came across this plugin, which seems great, but unfortunately does not
work for me out of the box: every synonym for every word I've checked comes out
as the word "name", like this:

Main entry: unfortunately

Definition: adv unluckily
Synonyms: name name name name name name name name name name , Definition: adv
inappropriately, Synonyms:, name name name name 

Changing the variable $5 in line 44 of thesaurus-lookup.sh to $15 seems
to fix the bug:

Main entry: unfortunately

Definition: adv unluckily
Synonyms: sadly miserably unhappily regrettably disastrously dismally
grievously horribly lamentably unsuccessfully , Definition: adv
inappropriately, Synonyms:, awkwardly ineptly inopportunely unsuitably 

However, as you can see, there's still an issue with stray commas and lack of
new lines before the second definition and second set of synonyms. Changing
line 40 from

printf "\nDefinition: %s", $3

to

printf "\n\nDefinition: %s", $3

(adding another \n) seems to help:

Main entry: unfortunately


Definition: adv unluckily
Synonyms: sadly miserably unhappily regrettably disastrously dismally
grievously horribly lamentably unsuccessfully 

Definition: adv inappropriately
Synonyms: awkwardly ineptly inopportunely unsuitably 

though there's probably a better fix.

@jiang-qian

I encounter the same problem. It's a very recent thing. The lookup works until the day before yesterday. Your workaround fix the problem! Thanks!

@Ron89 Ron89 added a commit to Ron89/vim-online-thesaurus that referenced this issue Feb 20, 2016
@Ron89 Ron89 fix issue #34 e4e2b62
@Ron89 Ron89 referenced this issue Feb 20, 2016
Closed

fix issue #34 #35

@Ron89
Ron89 commented Feb 20, 2016

The author deliberately replaced the end of line symbol after the last entry of Synonyms with ', '. Probably because he wanted to save space.

While using the plugin, I also noticed another issue related to the layout issue you mentioned. That is, some of the synonyms are actually word groups separated by white space, hence using white space for synonym separation is confusing. The issue together with the one you mentioned are fixed in #35 .

@beloglazov
Owner

Thanks for letting me know! The issue was caused by a slight change of thesaurus.com html output, it should be fixed now.

@maxigaz
maxigaz commented Jan 14, 2017

Even though I'm using the latest version of this plugin with Neovim, I have the same problem as OP. My output is identical, too:

Main entry: unfortunately

Definition: adv unluckily
Synonyms: name name name name name name name name name name , Definition: adv
inappropriately, Synonyms:, name name name name 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment