Giter Site home page Giter Site logo

dusty-word's Introduction

Dusty Word

Purpose

Allows you to ask your computer dictionary and thesarus questions in fairly natural English. Uses the Datamuse and Owlbot APIs. See the usage section for more.

$ word which sounds like new
                      datamuse thinks these words may help!
           new           knew             nu            gnu
           nue            noo            nou           neww
          niue           neuk            nnu            nuw
          gnaw            gne            gna           gnow
           gno           gnau            gni            gny

Installation and Dependencies

Linux/Mac

Download the word script and make it executable chmod u+x word.

Run ./word -h.

You can also use the python version as described for Windows. Comment out these lines if you don't want to install the colorama library:

  • from colorama import init as colorama_init
  • colorama_init()

Windows

You'll need

  • Python 3.6+
  • sys, re, requests, subprocess libraries
  • colorama library (Windows)
  • pytest (if you want to run the test suite)

Download the word.py file. Open command prompt and navigate to the place you saved it (for example cd C:\\Users\myname\Downloads). If you haven't installed them already, install the libraries:

> python -m pip3 install requests
> python -m pip3 install colorama

If you get an error about python not being found, make sure you did install it first. If you did, search the web for "windows python path".

Launch the program by running:

> word.py --help

Usage

Usage: word [options] [primary modifiers] <word|phrase>
       [primary|secondary modifiers <word|phrase|number>]

    -v[vv]                           verbose modes.
    -h, --help                       Print this help.

Primary modifier examples:
   meaning          "word meaning feeling tired"
   sounds like      "word which sounds like tung"
                    "word sounding like doe but spelled differently"
   rhymes with      "word rhymes with culminate"
   comes after      "word comes after sea and that rhymes with norse"
   spelled like     "word spelled like 'cens?r'"
   defined          "word nostrum defined" 
   pronunciation    "word pronunciation of otolaryngology"

Secondary modifiers:
   max              "word like beautiful max 7"         (default is 20)
   about            "word meaning refuse about trash"   (max is 5 nouns)
                    "word meaning refuse about negotiation contracts"

word tries to guess your intent. If it messes up, use quotes.
                    word meaning of life              == ml=of+life
                    word "meaning of life"            == ml=meaning+of+life

Extra Notes

At some point I might re-implement this using nltk. For now, the grammar is fairly strict.

Other similar projects (which I haven't tried):

drawnepicenter/leximaven (requires node.js)

margaret/python-datamuse (for use directly in python programs)

dusty-word's People

Contributors

sspj avatar

Watchers

 avatar

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.