Word Freak is a Python library that extracts word frequencies from files.
Project description
Word Freak
Word Freak is a Python library that extracts word frequencies from files.
Supported File Types
File Extension | Explanation | Supported |
---|---|---|
.doc | Microsoft Word document pre-2007 | :x: |
.docx | Microsoft Word document post-2007 | :heavy_check_mark: |
Portable Document Format | :heavy_check_mark: | |
.txt | Plain text file | :heavy_check_mark: |
Installation
Use the package manager pip to install..
pip install wordfreak
Usage
import wordfreak
# Take a text source and save the word frequencies to JSON.
# Extracts word frequencies from 'inputFile.txt' and saves them to 'outputFile.json'.
wordfreak.extractWordFrequencies("C:\\inputFile.txt", "C:\\outputFile.json")
# Take a saved word frequencies JSON file and converts it to a Python dictionary.
# Loads word frequencies from 'wordFrequencies.json' and saves them to the variable wordFrequencyDict.
wordFrequencyDict = wordfreak.pythonizeWordFrequencies("C:\\wordFrequencies.json")
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
wordfreak-0.0.11.tar.gz
(5.8 kB
view hashes)
Built Distribution
Close
Hashes for wordfreak-0.0.11-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ac72cf04c72fe3fe66ca2f82824b2109418da2b359939add45fe54cb5a397b4 |
|
MD5 | 9bd74966690430ef3226257abcd0507c |
|
BLAKE2b-256 | e957dc6204554c0c5f50c2bd93ba55c2e90f9709950b373836f15afec9823998 |