4 ms·
Vocab: An online dictionary integration to the command line
- groceryheist 8y agoAnd what was wrong with dict?
- Mckinsey666 8y agoWhat is the problem you are facing?
- acidburnNSA 8y agoI think the question is how does this compare/contrast with the dict command, a common utility that uses the Dictionary Server Protocol to query dictionaries from the command line.
- groceryheist 8y agoGetting a definition or spelling correction for a word or a list of synonyms and antonyms, maybe a brief etymology, without interrupting my workflow at the command line or opening a slow heavy program like a web browser or office suite.
- Mckinsey666 8y agoWow, thanks alot for the feedback. To be honest, I didn't know the 'dict' command prior to your reply (what a shame lol). It is true that 'dict' is much more lightweight and robust, but since I myself is ESL, this was initially aimed at ESL-people, so I added some features to help them learn English.
- edlinfan 8y agoCame here to say this! This program would be even cooler if it supported the dict protocol in addition to scraping OED. The dict protocol and CLI tool [1] were invented to solve the exact problem of browsing dictionaries without a bloaty web browser. You may wish to check them out. On debian, sudo apt-get install dict, and you're off and running. The most popular dict server may also be queried via a web UI [2] if you'd like to try it out before installing any software. It queries a few public-domain dictionaries, WordNet, plus some fun stuff like the Jargon File. This being an open standard, you may also run your own dict server if you wish. It's pretty cool. dict has become a vital part of my CLI workflow since I discovered it many years ago. Its only downside is that it's blocked by some corporate firewalls =( [1] https://en.wikipedia.org/wiki/DICT https://en.wikipedia.org/wiki/DICT [2] http://www.dict.org/bin/Dict http://www.dict.org/bin/Dict
- Mckinsey666 8y agoThanks for the feedback! I will definitely check them out. The problem you pointed out (firing up a bloaty browser) is exactly the problem I am facing, hence the birth of Vocab. I am not a native speaker, so one of my goals is also to add some supporting features to help people learn English.
- purplezooey 8y agothis is badass, thanks
- Mckinsey666 8y agoThanks. It's really just a simple script (less than 300 lines of Python).
- peterburkimsher 8y agoIs this using dedict? That is a tool released in 2015 that parses the Mac OS built-in dictionaries, including ODE. "After I wrote my post about Apple's dictionary files, I got a mysterious email showing up in my inbox. The email was from someone who's spent some time writing code to do the same thing, but doesn't want to post it under his own name in case he falls fowl of his country's DMCA equivalent. Crazy. He said I could post his code under the condition that I took his name off it." https://josephg.com/blog/apple-dictionaries-part-2/ https://josephg.com/blog/apple-dictionaries-part-2/ Vocab adds a few other features such as adding new words, so it's a welcome addition to this space. It seems that most custom dictionaries use the Stardict format, so perhaps adding that file format would be a way to bring in more of the community.
- Mckinsey666 8y agoThanks for the feedback. I simply scraped the oxford online dictionary using requests and bs4, no fancy stuff. Also, thanks for your advice!
- netsharc 8y agoMan, leaving in your typos in the first GIF "screen recording" is IMO just sloppy. It's the first thing I looked at on the page and, boom, it's a typo. Personally it gave me the impression of unprofessionality.
- Mckinsey666 8y agoThanks for the feedback. I will fix this issue.
- m4r35n357 8y agoBah! It is not a "command line", it is a shell!
- _Microft 8y agoSlightly OT, just in case someone has a similar problem: I (ab)used Wikipedia as special dictionary (1) during my thesis by means of a script that looked up the english article to the search-word and extracted the title of the link to the article in my mother tongue out of it. Admittedly it was a crude solution but it worked well enough then. (1) It was meant to be used for technical terms that wouldn't be in most normal dictionaries.
- zumu 8y agoI used to use this trick as well. Wikipedia is easily the best jp <-> en technical dictionary I've ever used.
- clamchowderz 8y agoIf this could have a thesaurus included, i'd set it up in a heartbeat.