A Commandline tool to mine haiku poems from text
Project description
Guten Haiku
A Commandline tool to mine haiku poems from text
- 80's cli interface with colors
- Works great with gutenberg books thx to a builtin cleaner script from Peyman Mohseni Kiasari
- Reconstructs punctuation of haikus using deepcorrect
- Appends json haiku's to a file
Install
$ pip install gutenhaiku
Then you need to download the models in cache:
$ gutenhaiku setup
Usage
$ gutenhaiku -f frankenstein.txt -a 'mary shelley' -t 'frankenstein' -d '1818-01-01'
Wat? Guten Haiko lets you extract haiku poems from text
Usage: gutenhaiku \
-f frankenstein.txt \
-a 'Mary Wollstonecraft Shelley' \
-t 'frankenstein' \
-d '1818-01-01'
Optional params: --commandfile [-cf] a file with comma seperated
values for f,a,t,d params
--outputfile [-o] the output file path [default haiku.json
--eighties [-e] eighties mode [default 1]
Advanced usage: gutenhaiku \
-f frankenstein.txt \
-a 'Mary Wollstonecraft Shelley' \
-t 'frankenstein' \
-d '1818-01-01' \
-f dracula.txt \
-a 'Bram Stoker' \
-t 'dracula' \
-d '1897-05-26'
setup: gutenhaiku setup
downloads AI models
Output format
example from assets
{
"page": 261,
"word_number": 65407,
"haiku": [
"He pointed towards.",
"The corpse of my wife I rushed.",
"Towards the window."
],
"author": "mary shelley",
"title": "frankenstein",
"date": "1818-01-01T00:00:00"
}
Dev
Run tests with
$ poetry run nox
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
gutenhaiku-1.0.0.tar.gz
(12.0 kB
view details)
Built Distribution
File details
Details for the file gutenhaiku-1.0.0.tar.gz
.
File metadata
- Download URL: gutenhaiku-1.0.0.tar.gz
- Upload date:
- Size: 12.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.5 CPython/3.7.5 Darwin/19.0.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67fd45bcd5d143a7c16ecdcf1d67158b6fa4e417adea0cc5c7479b20e836e8b7 |
|
MD5 | dee0d573d11b5ead538a0026d8e95895 |
|
BLAKE2b-256 | 6aad50dc9c4c11b6af17d63114b860a5e4a7ca9f0380d0d44b1b4c505ee31394 |
File details
Details for the file gutenhaiku-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: gutenhaiku-1.0.0-py3-none-any.whl
- Upload date:
- Size: 14.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.5 CPython/3.7.5 Darwin/19.0.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ad64bef8bfc0cdaff33b3a3f83e0e1858b20ef4ad90104d34a625942b7f226e |
|
MD5 | 33292fcbdd89353a3e15ff4bc792d58e |
|
BLAKE2b-256 | 4c0cddcc482258eb10250d3ed3eeece9ea2a648ac55404141e8ddb7805f8ccb0 |