Jump to content

SynAnt — Substitute words by checking against a thesaurus


vitor

Recommended Posts

Use the thesaurus service provided by words.bighugelabs.com to get synonyms and antonyms to words.


To set up, get an API key and set it in the Workflow Environment Variables.


You can then check for synonyms and antonyms by calling syn or ant followed by a space and the word you wish to check against.


rZB8NlO.png
5DDgYfq.png


Alternatively, select a word and press the shortcut you defined to get the results. Pressing ↵ on a word will paste it to the front most app, which is useful when writing a text and want to change a word in place.


If you want to use one of the results to refine your query, press ⌘↵ (synonyms for the word) or ⌥↵ (antonyms for the word).

 

Download | Source

Edited by vitor
Link to comment
  • 3 months later...

Thank you, somada141. Admittedly, having to go get an API key can be a deterrent. To me, it’s certainly worth it, and I’m glad others like it as well. At the time I searched a great deal for a service that wouldn’t require an API key, but they all sucked.

Link to comment
  • 4 months later...

Thank you, somada141. Admittedly, having to go get an API key can be a deterrent. To me, it’s certainly worth it, and I’m glad others like it as well. At the time I searched a great deal for a service that wouldn’t require an API key, but they all sucked.

 

Correct, it could be a deterrent, but it is worth, I agree with you. Well done!

Link to comment
  • 8 months later...

Just trying out this workflow. Oddly enough, it works perfectly for synonyms, but when I type ant followed by a space, then the word, it won't produce results and offers to search for the term on Google/Amazon/Wikipedia. Here is the output from the debugger, unfortunately I have no idea what it means. 

Starting debug for 'SynAnt'

[STDERR: alfred.workflow.input.scriptfilter] % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   508  100   508    0     0    635      0 --:--:-- --:--:-- --:--:--   636
[STDERR: alfred.workflow.input.scriptfilter] % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:02 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:02 --:--:--     0
curl: (3) <url> malformed
[STDERR: alfred.workflow.input.scriptfilter] % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   784  100   784    0     0   1393      0 --:--:-- --:--:-- --:--:--  1395
[STDERR: alfred.workflow.input.scriptfilter] % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   508  100   508    0     0   1153      0 --:--:-- --:--:-- --:--:--  1151
100   508  100   508    0     0   1153      0 --:--:-- --:--:-- --:--:--  1151
[STDERR: alfred.workflow.input.scriptfilter] % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
[STDERR: alfred.workflow.input.scriptfilter] % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (3) <url> malformed
[STDERR: alfred.workflow.input.scriptfilter] % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   508  100   508    0     0    647      0 --:--:-- --:--:-- --:--:--   647
[STDERR: alfred.workflow.input.scriptfilter] % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (3) <url> malformed
[STDERR: alfred.workflow.input.scriptfilter] % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   784  100   784    0     0    756      0  0:00:01  0:00:01 --:--:--   756
[STDERR: alfred.workflow.input.scriptfilter] % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   343  100   343    0     0    404      0 --:--:-- --:--:-- --:--:--   404
[STDERR: alfred.workflow.input.scriptfilter] % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  2128  100  2128    0     0   1710      0  0:00:01  0:00:01 --:--:--  1710
[STDERR: alfred.workflow.input.scriptfilter] % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
[STDERR: alfred.workflow.input.scriptfilter] % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   257  100   257    0     0    474      0 --:--:-- --:--:-- --:--:--   474
100   257  100   257    0     0    474      0 --:--:-- --:--:-- --:--:--   474
[STDERR: alfred.workflow.input.scriptfilter] % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   257  100   257    0     0    360      0 --:--:-- --:--:-- --:--:--   360
100   257  100   257    0     0    360      0 --:--:-- --:--:-- --:--:--   360
[STDERR: alfred.workflow.input.scriptfilter] % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
 43  2200   43   951    0     0    811      0  0:00:02  0:00:01  0:00:01   812
100  2200  100  2200    0     0   1860      0  0:00:01  0:00:01 --:--:--  1861
Link to comment
  • 1 year later...
  • deanishe changed the title to SynAnt — Substitute words by checking against a thesaurus
  • 5 months later...
  • 1 month later...

Update.


Option to requery results directly. If you want to use one of the results to refine your query, press ⌘↩ (synonyms for the word) or ⌥↩ (antonyms for the word).


To update, download the latest version (same URL) or wait a few days (15 or less) and it’ll prompt you to on next usage, since it uses OneUpdater.

Link to comment
  • 1 month later...

A bit strange - having the same issue as the gentleman above who upon using the syn or ant keyword, it'll prompt me to search Google or other engines rather than generating synonyms. I've ensured that the API key is entered correctly. Any ideas?

Link to comment
  • 5 months later...

Great workflow @vitor, I like it a lot.

 

I noticed that it eats requests like crazy though. I searched 3 (not very long) words and they generated 51 requests on the API counter. Since each tier has a limited number of requests (e.g. free tier is max 500 requests), you will be forced to upgrade rather quickly.

 

Every single letter creates a new request, e.g. "syn good" will generate 4 requests (g, go, goo, good).

 

Instead of a live search, perhaps you could add a kind of accumulator or delay before sending the completed query?

Link to comment
1 hour ago, Peter U said:

Great workflow @vitor, I like it a lot.

 

Thank you!

 

1 hour ago, Peter U said:

Instead of a live search, perhaps you could add a kind of accumulator or delay before sending the completed query?

 

Alfred can do that on its own. It checks how fast you type and adds an automatic delay after each character so it tries to run as infrequently as possible, ideally only when you stopped typing. I tend to always turn that on, but this Workflow is pretty old so I don’t recall if the feature was available when I first built it. Either way, I checked and seems I forgot to turn that on. It’s now how it works (download the latest version, just released), so you should be seeing a significant decrease in requests.

 

Thank you for noticing.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...