Giter Site home page Giter Site logo

pyvoc's Introduction

Cross-platform dictionary and vocabulary building command line tool

platforms


Pyvoc

Use it to improve your english vocabulary, brush up some word meanings or as a simple command line dictionary.


Jump to:

Installation

Install it using pip. Just run:

pip3 install pyvoc

Usage

After installing pyvoc, run pyvoc -w word to automatically create necessary config files in your home directory.

  • Fetch meaning of word
pyvoc -w word
  • Fetch meaning of word and add it to vocabulary group:
pyoc word -a
  • Take quiz from vocabulary group 101 (default questions are 5):
pyvoc -q 101
  • Take quiz of 25 questions from vocabulary group 101 :
pyvoc -q 101 -n 25

read some more examples

➜ pyvoc -h
usage: pyvoc [-h] [-v] [-w <word>] [-a] [-g <group_num>] [-r <group_num>] [-q <group_num>] [-n <no_of_questions>] [-l]

Command line dictionary and vocabulary building tool.

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         Print version of pyvoc and exit
  -w <word>             Give meaning of WORD
  -a, --add-word        Use to add WORD to vocabulary group
  -g <group_num>        Use to specify the vocabulary group no.(1-10) to add the WORD to
  -r <group_num>        Revise the vocabulary group you mention
  -q <group_num>        Start quiz from the vocabulary group you mention
  -n <no_of_questions>  Mention the number of questions of quiz.
  -l, --list            Lists all vocabulary groups present

groups

pyvoc lets you add words to vocabulary groups, which you can later revise or take quiz from.

  • 3 custom groups of 800 words each (words taken from GRE and SAT preparation websites) already present. These groups are 101, 102 and 103.
  • 10 groups of 50 words are reserved for the user. These groups are 1 - 10.
  • you can specify a group from 1-10 using [-g] option.

Examples

add word to a specific group

pyvoc word -a -g 5

Fetch meaning of the word and add it to vocabulary group 5. Use this option to organize words however you like.

for example

  • alphabatically
  • words from books you have been reading
  • parts of speech
  • increasing difficulty

revise a group

pyvoc -r 7

Revise word meaning of vocabulary group 7(if present) in random order.


show group list

pyvoc --list

Lists all group numbers along with their size.

pyvoc's People

Contributors

makkoncept avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pyvoc's Issues

UnicodeEncodeError: 'ascii' codec can't encode character '\u2018' in position 22: ordinal not in range(128)

After install, I get this error:

(python3) Sun Jan 13 15:18:52 [Mint] user [~] $ pyvoc word
 |

word 
Verb:            express something spoken or written
example:         he words his request in a particularly ironic way

Noun:            single meaningful element of speech or writing
example:         Traceback (most recent call last):
  File "/home/user/anaconda2/envs/python3/bin/pyvoc", line 11, in <module>
    sys.exit(main())
  File "/home/user/anaconda2/envs/python3/lib/python3.5/site-packages/pyvoc/pyvoc.py", line 160, in main
    parsed_response = dictionary(args.word)
  File "/home/user/anaconda2/envs/python3/lib/python3.5/site-packages/pyvoc/pyvoc.py", line 103, in dictionary
    pretty_print_definition(word, parsed_response, examples)
  File "/home/user/anaconda2/envs/python3/lib/python3.5/site-packages/pyvoc/pyvoc.py", line 68, in pretty_print_definition
    print(sentence)
UnicodeEncodeError: 'ascii' codec can't encode character '\u2018' in position 22: ordinal not in range(128)

Not installing correctly with pip 19.0.2 on sparkylinux-testing

I am Not a python dev, so your patience is requested.

Installed pip from the pip website, then installed pyvoc with sudo pip install pyvoc.

So I get the following error

pyvoc execreble
Traceback (most recent call last):
  File "/usr/local/bin/pyvoc", line 6, in <module>
    from pyvoc.pyvoc import main
  File "/usr/local/lib/python2.7/dist-packages/pyvoc/pyvoc.py", line 12, in <module>
    from pyvoc.check_config import read_config_file, check_config_dir
ImportError: No module named check_config

I suppose it could be a missing check_config module, but that seems to be uninstallable in current pip, as well as pypitools is uninstallable.

Remove words from user groups

First of all, thanks for implementing this tool!

I have just come across this tool and find it very useful for vocabulary building. However, by looking at the code I noticed that it only allows to add words to user groups 1 to 10, and it doesn't let add any more once the group is full. It would be nice to be able to empty or remove words from user groups once we have mastered. I came across an article that mentioned the possibility of creating 100 user groups. However, I believe that to be an old version, as it didn't require the use of -w option for words.

Once again, thanks for sharing this tool!

Spellcheck or "did you mean" on word 404

Cool module! Just a suggestion:

On 404 or maybe even before hitting the API, it would be worth it to check a dictionary or get a suggestion.

print("No definition found. Please check the spelling!!")

pip3 install enchant
import enchant
d = enchant.Dict('en_US')
print(d.check('chese'))  # False
print(d.check('chese'))  # ['cheese', 'these', 'chase', 'chose', 'chess', 'chest', 'Chester', 'Cheslie', 'Cheston', 'Cheshire']

Add a release tag of your last versión

Hi
Congrats for your code
I'll like to make a personal ebuild to automatize distribution of your code in my Gentoo Linux Portage
I think it's a good habit, to make releases in Github, adding tags to git
I see you have versions in pypi, but not here.
Would you mind tagging the last version of your code.
Thanks

Populate vocabulary groups randomly?

Good job on this nice CLI tool. Right now it serves well as a dictionary.

EDIT: I didn't notice that groups 101, 102, 103 exists until I looked manually at ~/.pyvoc. I see that you have indeed pointed that in the README. Perhaps indicate that when you initialize / when you do pyvoc --list.

I am not sure how the Oxford dictionary API works, but perhaps you can populate the vocabulary groups by loading from https://en.oxforddictionaries.com/explore/word-lists. Once there is such a functionality in place, it would be also nice to populate from other word lists freely available (if it exists, and it should).

pyvoc verbs

Is that possible to add a conjugation verb feature?
Like showing the verbs tenses - and conjugation?
Because in the case of verbs the actual features are very simple.
It is not really a issue, but a feature request...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.