49 11
Contact Author Sign in to rate

AutoDefine - Automatically define vocabulary words with pronunciations and image

0.07MB. Updated 2020-11-16.

Description

AutoDefine simplifies finding definitions and pronunciations for words. Just install AutoDefine, click the blue globe (or use the shortcut Ctrl+Alt+E), and see all pronunciations and definitions appear within the card instantly! Configuration options allow you to specify which field the pronunciation / definitions will be inserted in. AutoDefine is optimized for use with an individual word/note at a time. If you want to generate many definitions at once, I recommend EasyDefine (it scales well to hundreds of words). Created by Robert Sanek. Licensed under GPLv2. See GitHub for the source. If you find any bugs, please file an issue. NOTE: This add-on uses Merriam-Webster's Collegiate® Dictionary with Audio API to get definitions and pronunciations. This requires you sign up for a Merriam-Webster account and use your own individual API access key. Go to the Merriam-Webster Dictionary API website, sign up for an account, and request access to the Collegiate Dictionary. Then, in Anki, go to Tools>Add-Ons>AutoDefine>Edit... and replace YOUR_KEY_HERE with your unique API key.

Download

As add-ons are programs downloaded from the internet, they are potentially malicious. You should only download add-ons you trust.

Supported Anki versions:

To download this add-on, please copy and paste the following code into Anki 2.1:

2136497008

If you were linked to this page from the internet, please open Anki on your computer, go to the Tools menu and then Add-ons>Browse & Install to paste in the code.

All Anki 2.1.x Add-Ons Contact Author

Reviews

on 1657844478
Love this fully functional and very useful add-on, the best I've had so far.
Keep it up!!!
on 1654425766
One of the best add-ons I have used in my life. Love it! :3
on 1648346006
Saved me so much time. Thank you.
on 1647415486
When I click on the 'e' icon, the resulting phonetic transcription is incomplete. Please give a solution
n. \-ˌbȯl\
on 1638371050
Good addon but it should really batch define all the selected cards rather than doing one by one click
on 1635377729
very usefulll without rivalry
on 1626606068
Very good - I use note ids as my first field and I didn't realise I could simply highlight the word to do the lookup until I noticed this in the code. To anyone whose word will not be the first field, you can just use a text editor to change the 0 in the _get_word function in autodefine.py to the index that works for you (in my case '1').
on 1626261962
Thank you so much for making this add-on
on 1624793301
Does it support Oxford Dictionaries? or can I add it?
on 1622978480
Works perfectly. But, how can I add individual buttons? There is no example in the description. By the way, Please add Learner's dictionary definition option too, because it is better for English learners like me. Thank you.
on 1615743555
Thanks for this great plugin, It saved me so much trouble. Is it possible to add images to it? I think it is included in API
on 1607879557
Thanks for this app, helps a lot !
Would it be possible to add synonyms as well?
Somehow it's possible to add definitions in the massive way?
on 1604475255
works great! thanks a lot
on 1593969083
Can Oxford Dictionary Support be added from https://www.lexico.com.
on 1591830773
can i use learner dictionary API instead COLLEGIATE dictionary API
on 1590768270
This is great, but I really miss the option to define a great number of words at once..Please can you make it ?
on 1590528709
Very clear installation steps. Thanks for the vid.
on 1588541354
Amazing
on 1586500660
So far so good! Really nice
on 1585141114
Thank you so much
on 1582171632
Great work! It saves us tremendous time. Thanks for sharing with us.
on 1581653721
thank you, it's quite helpful.
on 1580287087
It's perfect!
Thank you!
on 1579468798
How one can add examples and synonyms from Merriam-Webster Dic?
there is no field for that in config!
on 1577543585
Does what I want it to: add pronunciations and definitions automatically to English vocab cards. Kudos for making that work! One thing that does concern me, however, is that there is often a short (>10 seconds, <1 minute?) period of time after I hit the autodefine button where I am unable to type anything into any of the fields in the add card box.
on 1571349595
Thank you so much for the incredible add-on!!!
on 1569667966
Sorry but I can't use it, it show an error:

-------------------------------------------

An error occurred in an add-on.
Please post on the add-on forum:
https://anki.tenderapp.com/discussions/add-ons

Traceback (most recent call last):
File "C:\Users\JingPC9700k\AppData\Roaming\Anki2\addons\AutoDefineAddon\core.py", line 184, in <lambda>
editor._addButton("AutoDefine", lambda ed=editor: get_definition(ed),
File "C:\Users\JingPC9700k\AppData\Roaming\Anki2\addons\AutoDefineAddon\core.py", line 55, in get_definition
etree = ET.fromstring(urllib2.urlopen(url).read())
File "xml\etree\ElementTree.py", line 1311, in XML
File "xml\etree\ElementTree.py", line 1653, in feed
File "xml\etree\ElementTree.py", line 1517, in _raiseerror
xml.etree.ElementTree.ParseError: syntax error: line 1, column 0

-------------------------------------------
on 1567946178
When using "Add note ID" this addon doesn`t work properly
because it always define words by first field information
but if dont use Add note ID, it would be perfect addon
on 1561709351
Helpfull, to find pronucation.
on 1558454058
Is there a conflict with night mode or edit files during review? I can't seem to get any shortcuts to work and no button appears.
on 1553916404
Thanks for sharing this one. so good so far : )
by the way, could you add examples related to words that I search for?
on 1553237799
太有用了!
on 1547955088
it doesn't work on linux
Comment from author
Linux should be supported, I use it on Ubuntu myself. If you're facing issues with your specific install, please file an issue on GitHub: https://github.com/z1lc/AutoDefine/issues
on 1546803465
Works like a champ.
on 1546181808
This is really great tool for me, I am using it for improving my English which is always difficult. AutoDefine made is easier and faster. Thank you!!!
on 1546117515
Excellent!
on 1545458261
Great insertion of M-W definition into field 1 of my card, but I couldn't get the pronuncation insertion to work. I set the value for pronunciation to file of "0", meaning the first field, or the front side of my card. My default deck only has two fields, front and back.
on 1538944047
So simple, so fast
on 1538803483
Extremely high-leverage
on 1538233577
I found it really useful
on 1538027659
Not working for me at the moment; no error message just de-selects the word and does nothing. Also will this grab a definition for single highlighted words or the entire field?

Edit: Still not getting an error message even with the updated version. I've got the insert definition and pronunciation features both set to -1 if that makes any difference.
That feature would be great - I use Anki for medical MCQ questions so would be awesome to be able to define particular words in the questions.

Edit 2: Hmm I don't want to actually insert the definition/pronunciation into a field though; just open up a dialogue box so I can read the definition and close it again. Is that possible? If not I'll add it to my suggestion to also enable searching of a single term in a field
Comment from author before post was edited
I've added some messaging to make it clearer when AutoDefine is working but can't find a definition.

AutoDefine looks for the definition based on the entire first field, but I have considered adding support for highlighted parts of a note as well.

Edit: setting both options to -1 will cause AutoDefine to not add the definition nor pronunciation to any fields. In your case, if you're not seeing a tooltip with an error, this means that for that specific word, a definition and/or pronunciation was found, but the -1 setting means the info won't be inserted anywhere. You should change the numbers to something non-negative that is still within the range of your fields - for example, 0 or 1.
on 1533419257
Sounds like what I want, unfortunately, CTRL-E brings up an export dialogue.
Comment from author
The default hotkey has now been changed to Ctrl+Alt+E, which should no longer conflict with the export hotkey while in the browser.
on 1512432000
exactly what I need.
on 1506297600
on 1503532800
on 1499904000
Perfect add on

I really like this add on but I didn't see any image
Comment from author
Opening an image search can be set in the configuration of the add-on.
on 1491609600
How to fix the error below

I believe most people are getting this error because this add-on assumes your API key is for the "collegiate" dictionary. If your API key is for a different dictionary, you need to change the URL in AutoDefineAddon/core.py.

For example, the URL for the medical dictionary is "http://www.dictionaryapi.com/api/references/medical/v2/xml/". You can find the URL for your API key by clicking on the key from this page: http://www.dictionaryapi.com/account/my-keys.htm.

Also, to make the add-on pick up the definition from this other dictionary I had to make the following change on line 121 of AutoDefineAddon/core.py.
Change from:
for dtTag in definition.findall("dt"):
to:
for dtTag in definition.findall(".//dt"):
on 1472256000
No access to examples

Thanks for great add. But is there some way to get access to "examples" in dictionary,not only to definition of words with audio and images? Would be so helpful..
on 1470268800
so-so

Only works for the collegiate dictionary, not for, say, the learner's or thesaurus. I get the same error messages as the users below. I'm wondering what ‘you need to import the python xml module manually using absolute path’ means. Care to explain in layman terms? :-)
on 1470182400
It deleted my definition and did not add any

Comment from author
I've updated the add-on and it no longer deletes the existing definition nor changes the first field's formatting.
on 1466985600
Good.

Sound doesn't work for me but I can use AwesomeTTS,
I wish the addon was using Learner's dictionary instead of main dictionary.
on 1462060800
solution to the problems posted

For whoever that has gotten a problem saying error importing etree or stuff like that, you need to import the python xml module manually using absolute path. This is because the python anki packaged does not include the xml package the author used.
on 1445990400
Problem

An error occurred in an add-on.
Please post on the add-on forum:
https://anki.tenderapp.com/discussions/add-ons

Traceback (most recent call last):
File "/Users/Spartan5685/Documents/Anki/addons/AutoDefineAddon/core.py", line 175, in <lambda>
editor._addButton("AutoDefine", lambda ed=editor: get_definition(ed),
File "/Users/Spartan5685/Documents/Anki/addons/AutoDefineAddon/core.py", line 57, in get_definition
etree = ET.parse(urllib.urlopen(url))
File "xml/etree/ElementTree.pyc", line 1182, in parse
File "xml/etree/ElementTree.pyc", line 656, in parse
File "xml/etree/ElementTree.pyc", line 1642, in feed
File "xml/etree/ElementTree.pyc", line 1506, in _raiseerror
xml.etree.ElementTree.ParseError: syntax error: line 1, column 0
Comment from author
This has now been fixed in the majority of cases, and there is graceful degradation for cases when this problem persists.
on 1440028800
on 1434585600
on 1432339200
on 1429228800
on 1423872000
on 1414368000
on 1413936000
the feature is not working

I just installed it and whenever I press the 'AD' button to get the auto definition, I receive following response :

An error occurred in an add-on.
Please post on the add-on forum:
https://anki.tenderapp.com/discussions/add-ons

Traceback (most recent call last):
File "C:\Users\Morteza\Documents\Anki\addons\AutoDefineAddon\core.py", line 175, in <lambda>
editor._addButton("AutoDefine", lambda ed=editor: get_definition(ed),
File "C:\Users\Morteza\Documents\Anki\addons\AutoDefineAddon\core.py", line 57, in get_definition
etree = ET.parse(urllib.urlopen(url))
File "C:\cygwin\home\dae\win\build\pyi.win32\anki\outPYZ1.pyz/xml.etree.ElementTree", line 1183, in parse
File "C:\cygwin\home\dae\win\build\pyi.win32\anki\outPYZ1.pyz/xml.etree.ElementTree", line 656, in parse
File "C:\cygwin\home\dae\win\build\pyi.win32\anki\outPYZ1.pyz/xml.etree.ElementTree", line 1643, in feed
File "C:\cygwin\home\dae\win\build\pyi.win32\anki\outPYZ1.pyz/xml.etree.ElementTree", line 1507, in _raiseerror
xml.etree.ElementTree.ParseError: syntax error: line 1, column 0
Comment from author
This has now been fixed in the majority of cases, and there is graceful degradation for cases when this problem persists.