Giter VIP home page Giter VIP logo

wfreq's Introduction

wfreq

Word frequency bar chart generator.

Demos

Hamlet

$ lua wfreq.lua --file hamlet.txt -m 20 -- --title "Words" --rotation 45 --label -x "Words" -y "Quantity"

Hamlet

1984

$ lua wfreq.lua -f 1984.txt -m 15 -- --title 'Words' --rotation -45 --label -x "Words" -y "Quantity"

1984

Help

$ lua wfreq.lua --help
Usage: wfreq [-h] [--max NUM] --file FILE [--version] [<pygram>] ...

Linkage script beetween Lab_4.4 and Pygram.

Arguments:
   pygram

Options:
   -h, --help            Show this help message and exit.
   --max NUM,            Max word count returned from Lab 4.4. Also the max bars
      -m NUM             to be shown in Pygram.
   --file FILE,          Input text file.
       -f FILE
   --version, -v         Print version and exit.

Typical format:
  $ wfreq <wfreq.lua options> [-- <pygram.py options>]
Where:
   <wfreq.lua options> Are shown above.
   <pygram.py options> You can check them with
                       $ python3 Pygram/pygram.py --help

Example usage:
  $ lua wfreq.lua -f hamlet.txt -m 20 -- --title Words --rotation 90
    --label -x "Words" -y "Quantity"

Getting started

  1. Clone the repo with git
    $ git clone --recurse-submodules https://github.com/Dolfost/wfreq
    
  2. Build the lab4.4 with build.sh
    $ cd Lab_4.4
    $ chmod +x build.sh
    $ ./build.sh
    $ cd ..
    
  3. Install Lua v5.3 and higher
    $ brew install lua
    
  4. Install luarocks
    $ brew install luarocks
    
  5. Install Lua dependencies
    $ luarocks install argparse
    
  6. Install python v3.0 and higher
    $ brew install python3
    
  7. Install python dependencies
    $ pip install -U matplotlib
    
  8. Ejoy!

Note that you might want to use different pakage manager than homebrew.

wfreq's People

Contributors

dolfost 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.