Skip to main content

A package for dealing with histograms.

Project description

realtweets: the world's most popular destination for real tweets

Build Status

codecov

kiwi

kiwi is a Python library generating and using histograms of a large corpus.

Installation

Use the package manager pip to install kiwi.

pip install kiwi

Usage

from kiwi.grams import Histogram

# Generate a histogram from a list of sentences
hist = Histogram(['A sentence here.',
                  'A sentence there.',
                  'A sentence anywhere.'])

# Generate a histogram from a text file
with open('corpus.txt', 'r') as file:
    file_hist = Histogram(file)

# Compare the similarity of two histograms
similarity = hist.similarity(file_hist)

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

grams-0.0.1.tar.gz (13.0 kB view hashes)

Uploaded Source

Built Distribution

grams-0.0.1-py3-none-any.whl (31.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page