Giter Site home page Giter Site logo

wiki-word-frequency-counter's Introduction

Wiki Word Frequency Counter

Displays the most frequent words on a given wikipedia page

๐Ÿƒ Running

./wiki-word-freq fetch

Usage:
  wiki-word-freq fetch

Options:
  [--page-id=N]                  # The page id of the wikipedia page you want to count
                                 # Default: 21721040
  [--downcase], [--no-downcase]  # Downcase all words before counting, so that HELLO == hello
                                 # Default: true
  [--count=N]                    # The number of words you want to retrieve
                                 # Default: 5
  [--min-word-length=N]          # The minimum size word to consider
                                 # Default: 4
  [--debug], [--no-debug]

Sample output

./wiki-word-freq fetch --count=7 --page_id=1023011 --min_word_length=6
URL: https://en.wikipedia.org/w/api.php?action=query&prop=extracts&explaintext&format=json&pageids=1023011
Title: Allen's rule
Top 7 words:
- 11: animals
- 9: surface, temperature
- 7: climates, volume
- 6: shorter, populations, predictions
- 5: different, ratios, temperatures, height
- 4: should, lengths, people, originate, regions, warmer, steegman, raised
- 3: adapted, predicts, because, argued, indigenous, species, colder, growth, cartilage, degrees

๐Ÿ”จ Development

  1. bundle install
  2. bundle exec rspec

wiki-word-frequency-counter's People

Contributors

mongey avatar

Stargazers

Fionn Malone avatar

Watchers

James Cloos avatar  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.