Skip to main content

Phrase: generates phrases given a corpus

Project description

Phrase

A library that builds on nltk and gensim to automatically generate phrases.

Installation

Add the package to your python path using pip:

`bash pip install phrase `

Usage

To create a phrase dictionary and print out the top 25 phrases:

`bash create_phrase_dictionary <corpus_folder> <phrase_dictionary_output_filename> `

This is not a light process, it can take a lot of memory and time, so be warned.

Tests

To run all the tests, you need to run py.test to pick up the unit tests. Lettuce is currently being used for BDD tests and needs to be run from the tests folder or with tests/ added to the PYTHONPATH (the tests utilize the units.helpers modules) `bash py.test PYTHONPATH=tests lettuce tests/features cd tests lettuce features/ `

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

phrase-0.0.10.macosx-10.5-x86_64.tar.gz (14.5 kB view details)

Uploaded Source

File details

Details for the file phrase-0.0.10.macosx-10.5-x86_64.tar.gz.

File metadata

File hashes

Hashes for phrase-0.0.10.macosx-10.5-x86_64.tar.gz
Algorithm Hash digest
SHA256 bd2900e3ce1aabf1d409782831f4c6cf55a41f1da65a95f8e599a558584c28ae
MD5 a5390e8cd902e2f4d6172f146ede2e56
BLAKE2b-256 051c78546e8fc1c3c6e6eeb77a2d6779f2e9a3afbe92804fb16b6ce5059ba5d5

See more details on using hashes here.

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