rhymediscovery
A python package for detecting rhyme schemes in poetry. With standard configuration, it achieves about 65% accuracy in the rhymedata corpus.
Basic usage
pip install rhymediscovery
>>> from rhymediscovery import find_schemes
>>> find_schemes.find_schemes([['herz', 'welt', 'geld', 'schmerz'], ...])
[(('herz', 'welt', 'geld', 'schmerz'), (1, 2, 1, 2)), ...]
Command line
The command line tool find_schemes expects a file formatted like the .pgold files in the rhymedata corpus. A sample file can be found here in the repo.
To demonstrate the tool, we clone the rhymedata corpus:
git clone https://github.com/sravanareddy/rhymedata.git
Then we run:
find_schemes rhymedata/english_gold/1415.pgold 1415.out
The 1415.pgold file from the corpus has been manually annotated with the correct rhyme schemes. Thus we can evaluate our result file using:
evaluate_schemes 1415.out rhymedata/english_gold/1415.pgold
Credits
This package implements the following paper:
Sravana Reddy and Kevin Knight. “Unsupervised discovery of rhyme schemes.” Proceedings of ACL 2011. (pdf)
It is a fork of the reference implementation by @sravanareddy which is available in its original form here.
Metadata
Release files for rhymediscovery 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| rhymediscovery-0.2.1.tar.gz | 12.4 kB | Without provenance | Details for rhymediscovery-0.2.1.tar.gz |
Release files / rhymediscovery-0.2.1.tar.gz
| Download URL | rhymediscovery-0.2.1.tar.gz |
|---|---|
| Size | 12.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f81ae01902a94b8a7df9231def6589a338a7a3bcf5fa7aacfb9ecbf449b78120
|
|
BLAKE2b-256 checksum How to use checksums |
a81a5d17c0ee174a01d4970956a5e4b1fcd35a6ca6cbc16f8108bc014bfcc60d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for rhymediscovery 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.