GithubHelp home page GithubHelp logo

chagge / wordsworth Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zhuyanxi/wordsworth

0.0 1.0 0.0 1.73 MB

Frequency analysis of letters, words and n-tuples.

License: GNU General Public License v3.0

wordsworth's Introduction

wordsworth

Frequency analysis of letters, words and arbitrary-length n-tuples of words. Alt text ###Basic wordsworth: ####Example 1: Print the top 50 n-words in textfile.txt

$ python wordsworth --filename textfile.txt --top 50
$ python wordsworth -f textfile.txt -t 50

####Example 2: Print the top n-tuples of up to 10 words in textfile.txt

$ python wordsworth --filename textfile.txt --ntuple 10
$ python wordsworth -f textfile.txt -n 10

###NLTK-enabled wordsworth: wordsworth-nltk.py provides extended analysis, including a frequency analysis of verbs, nouns, adjectives, pronouns etc. To run this script you will need to install the python Natural Language Toolkit (NLTK) and the Brown and punkt datasets. Fortunately this is very simple to install.

Step 1. Install NLTK

$ sudo pip install nltk

Step 2. Launch the python interpretter

$ python

Step 3. Download the Brown dataset

>>> import nltk
>>> nltk.download('brown')
>>> nltk.download('punkt')

###Example output:

Alt text
Alt text
Alt text
Alt text
Alt text
Alt text

wordsworth's People

Contributors

autonomoid avatar

Watchers

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