Skip to main content

Pure python implementation of ROUGE-1.5.5. for korean

Project description

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)}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

korouge_score-0.1.4.tar.gz (19.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

korouge_score-0.1.4-py3-none-any.whl (28.4 kB view details)

Uploaded Python 3

File details

Details for the file korouge_score-0.1.4.tar.gz.

File metadata

  • Download URL: korouge_score-0.1.4.tar.gz
  • Upload date:
  • Size: 19.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.13

File hashes

Hashes for korouge_score-0.1.4.tar.gz
Algorithm Hash digest
SHA256 a5da97b608ec7431469208424f5a11668561e29c3db72866c98ce8f6e53d8a3d
MD5 51bb446559cdba6dbdab6ec7550b5567
BLAKE2b-256 ba00dbd731fe9b758e6b3a66059a5c8fb21890cdbae5159e956a790876f1515d

See more details on using hashes here.

File details

Details for the file korouge_score-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: korouge_score-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 28.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.13

File hashes

Hashes for korouge_score-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 27139c62e097a35d3148c8398a81014084d7d952876340e087431c5f69512884
MD5 423b696b2393adc8e8d7c298477844cf
BLAKE2b-256 85685f5dc6e96a232f1167e3d6ff241b9d93944125bf57975ead76b07a65bc44

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page