Rouge Implementation for Korean
original source code from https://github.com/google-research/google-research/tree/master/rouge
기존 rouge_scorer는 알파벳과 숫자를 제외하고는 제거했기 때문에 한국어로는 계산하려면 별도로 처리가 필요했습니다. tokenize.py 에서 해당 부분을 주석처리한 뒤 pypi로 새롭게 배포했습니다. 따라서 불용어나 특수문자 제거, stemmer처리 등은 별도로 진행해야 합니다.
pip install korouge_score
from korouge_score import rouge_scorer
scorer = rouge_scorer.RougeScorer(["rouge1", "rouge2", "rougeL", "rougeLsum"])
ref = "안녕하세요 반가워요 오늘 뭐 먹을래요?"
pred = "안녕 ㅋ 반가워 오늘 뭐 할래?"
print(scorer.score(ref, pred))
>>> {'rouge1': Score(precision=0.3333333333333333, recall=0.4, fmeasure=0.3636363636363636), 'rouge2': Score(precision=0.2, recall=0.25, fmeasure=0.22222222222222224), 'rougeL': Score(precision=0.3333333333333333, recall=0.4, fmeasure=0.3636363636363636), 'rougeLsum': Score(precision=0.3333333333333333, recall=0.4, fmeasure=0.3636363636363636)}
Metadata
Release files for korouge-score 0.1.4
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 |
|---|---|---|---|---|
| korouge_score-0.1.4.tar.gz | 19.4 kB | Without provenance | Details for korouge_score-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| korouge_score-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for korouge_score-0.1.4-py3-none-any.whl |
Total release size: 47.8 kB
Release files / korouge_score-0.1.4.tar.gz
| Download URL | korouge_score-0.1.4.tar.gz |
|---|---|
| Size | 19.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a5da97b608ec7431469208424f5a11668561e29c3db72866c98ce8f6e53d8a3d
|
|
BLAKE2b-256 checksum How to use checksums |
ba00dbd731fe9b758e6b3a66059a5c8fb21890cdbae5159e956a790876f1515d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.13
|
Release files / korouge_score-0.1.4-py3-none-any.whl
| Download URL | korouge_score-0.1.4-py3-none-any.whl |
|---|---|
| Size | 28.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
27139c62e097a35d3148c8398a81014084d7d952876340e087431c5f69512884
|
|
BLAKE2b-256 checksum How to use checksums |
85685f5dc6e96a232f1167e3d6ff241b9d93944125bf57975ead76b07a65bc44
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.13
|
Security for korouge-score 0.1.4
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.