{"id":42253709,"url":"https://github.com/mbforbes/textmetrics","last_synced_at":"2026-01-27T05:17:17.804Z","repository":{"id":57474684,"uuid":"122372266","full_name":"mbforbes/textmetrics","owner":"mbforbes","description":"Automatic text metrics (BLEU, ROUGE, METEOR, +++)","archived":false,"fork":false,"pushed_at":"2018-08-07T23:46:08.000Z","size":66802,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-29T10:31:04.022Z","etag":null,"topics":["bleu","meteor","metrics","ngrams","nlp","rouge","text","text-metrics","vocab","vocabulary"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mbforbes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-02-21T17:55:31.000Z","updated_at":"2024-12-30T13:46:52.000Z","dependencies_parsed_at":"2022-09-10T02:21:34.034Z","dependency_job_id":null,"html_url":"https://github.com/mbforbes/textmetrics","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mbforbes/textmetrics","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbforbes%2Ftextmetrics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbforbes%2Ftextmetrics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbforbes%2Ftextmetrics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbforbes%2Ftextmetrics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mbforbes","download_url":"https://codeload.github.com/mbforbes/textmetrics/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbforbes%2Ftextmetrics/sbom","scorecard":{"id":630940,"data":{"date":"2025-08-11","repo":{"name":"github.com/mbforbes/textmetrics","commit":"f9b94a6e710ccc38c66e3e678fdc40812d25fa3c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: textmetrics/meteor/meteor-1.5.jar:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 0/14 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Vulnerabilities","score":3,"reason":"7 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2018-34 / GHSA-2fc2-6r4j-p65h","Warn: Project is vulnerable to: PYSEC-2021-856 / GHSA-5545-2q6w-2gh6","Warn: Project is vulnerable to: PYSEC-2019-108 / GHSA-9fq2-x9r6-wfmf","Warn: Project is vulnerable to: PYSEC-2018-33 / GHSA-cw6w-4rcx-xphc","Warn: Project is vulnerable to: PYSEC-2021-857 / GHSA-f7c7-j99h-c22f","Warn: Project is vulnerable to: GHSA-fpfv-jqm9-f5jm","Warn: Project is vulnerable to: PYSEC-2017-1 / GHSA-frgw-fgh6-9g52"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-21T07:53:35.715Z","repository_id":57474684,"created_at":"2025-08-21T07:53:35.715Z","updated_at":"2025-08-21T07:53:35.715Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28803650,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T03:44:14.111Z","status":"ssl_error","status_checked_at":"2026-01-27T03:43:33.507Z","response_time":168,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bleu","meteor","metrics","ngrams","nlp","rouge","text","text-metrics","vocab","vocabulary"],"created_at":"2026-01-27T05:17:17.251Z","updated_at":"2026-01-27T05:17:17.782Z","avatar_url":"https://github.com/mbforbes.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# textmetrics\n\nAutomatic text metrics---BLEU, ROUGE, and METEOR, plus extras like vocab and\nngrams.\n\n## Usage\n\n```bash\n# Compares each candidate (c) separately against all references (r).\npython -m textmetrics.main c1.txt c2.txt --references r1.txt r2.txt r3.txt\n```\n\n## Installation\n\nRequires:\n- Perl (for BLEU)\n- Java 1.8 (for METEOR)\n- Python 3.6+\n\n```bash\npip install textmetrics\n```\n\n## Features\n\n- [x] BLEU\n- [x] ROUGE\n- [x] METEOR\n\n\n## Notes\n\nBLEU and METEOR use the refernce implementations (in Perl and Java,\nrespectively). We originally used the reference Perl implementation for ROUGE\nas well, but it ran so slowly that we opted for a Python reimplementation\ninstead. (ROUGE's original Perl implementation is also more difficult to setup,\neven with wrapper libraries.)\n\n## Worklist\n\n- [ ] pypi\n\n- [ ] API support (possible to have interface for passing strings?)\n\n- [ ] ROUGE crashes things if it decides there aren't sentences (e.g., run with\n  README.md as input and reference)\n\n- [ ] Add back in orig ROUGE for completeness (place behind switch)\n\n- [ ] BLEU perl script fails if the filename ends in `gz` because it tries to\n  un-gzip it, which happens eventually when creating a lot of files. we should\n  wrap the filename creation so this doesn't happen\n\n- [ ] ngrams has divide by zero error. With two simple files (two lines each,\n  same first line, differing second line) running with `2.txt --references\n  1.txt 1.txt` triggered this divide by zero\n\n- [ ] Demo + guide for better README (should cover file + API usage)\n\n- [ ] Tests\n\n- [ ] Early check in each module for whether program runnable + nice error\n  message (e.g., no java or bad version, no perl or bad version, etc.)\n\n\nNote to self: I followed this guide for [packaging to\npypi](https://packaging.python.org/tutorials/packaging-projects/), and future\nuploads will probably look like:\n\n```bash\n# (1) ensure tests pass\n\n# (2) bump version in setup.py\n\n# (3) commit + push to github\n\n# (4) generate distribution\npython setup.py sdist bdist_wheel\n\n# (5) Upload\ntwine upload dist/*\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbforbes%2Ftextmetrics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmbforbes%2Ftextmetrics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbforbes%2Ftextmetrics/lists"}