ikku
Discover haiku from text. Thanks to https://github.com/r7kamura/ikku
Requirements
- Python 3.8.x+
- MeCab with IPADIC (e.g.
brew install mecab mecab-ipadic)
Installation
pip install ikku
Example
Reviewer is the main interface for this library.
from ikku import Reviwer
reviewer = Reviewer()
Judge if given text is valid song or not.
reviewer.judge("古池や蛙飛び込む水の音") #=> true
reviewer.judge("ああ古池や蛙飛び込む水の音ああ") #=> false
Find one valid song from given text.
reviewer.find("ああ古池や蛙飛び込む水の音ああ")
#=> <class 'ikku.song.Song'>
Search all valid songs from given text.
reviewer.search("ああ古池や蛙飛び込む水の音ああ天秤や京江戸かけて千代の春ああ")
#=> [
# [<class 'ikku.song.Song'>],
# [<class 'ikku.song.Song'>],
# ]
Return an Array of phrases of ikku.node.Node.
song.phrases #=> [["古池", "や"], ["蛙", "飛び込む"], ["水", "の", "音"]]
Pass rule option to change the measure rule (default: [5, 7, 5]).
reviewer = Reviewer(rule = [4, 3, 5])
reviewer.judge("古池や蛙飛び込む水の音") #=> false
reviewer.judge("すもももももももものうち") #=> true
Metadata
Release files for ikku 0.1.3
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 |
|---|---|---|---|---|
| ikku-0.1.3.tar.gz | 5.8 kB | Without provenance | Details for ikku-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ikku-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for ikku-0.1.3-py3-none-any.whl |
Total release size: 12.5 kB
Release files / ikku-0.1.3.tar.gz
| Download URL | ikku-0.1.3.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
28d5cee95b6013cb3a82a8ef7790c0636a42d8ddbad6be3a91cae6a45a2f6fda
|
|
BLAKE2b-256 checksum How to use checksums |
93f600cc0a7c820fc4e5815d69da618ef0460ed4a9bf2e715ced8d0648083ab7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2
|
Release files / ikku-0.1.3-py3-none-any.whl
| Download URL | ikku-0.1.3-py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3762a964b2b6989e13e793d2c3a970074e5e408e1976bafddaaf2be9db2d0c4e
|
|
BLAKE2b-256 checksum How to use checksums |
8a6e5084e87ed2f8010daea91ca9233264f5af193fa56bd1211e67b7e8832312
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2
|
Security for ikku 0.1.3
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.