Subtree Metric for the translation evaluation
Project description
Subtree Metric Package
This package provides an NLTK-like interface to measure the STM score of the given hypothesis and ideal translations.
There is also a web-app available with a GUI which includes the metrics provided in this package.
URL: http://nlp-metrics.herokuapp.com
Usage example
import spacy
from subtree_metric import stm
nlp: spacy.Language = spacy.load('en_core_web_md')
ref = 'It is a guide to action that ensures that the military will forever heed Party commands'
hyp = 'It is a guide to action which ensures that the military always obeys the commands of the party'
print(stm.sentence_stm(ref,
hyp,
nlp))
ref = 'It is a guide to action that ensures that the military will forever heed Party commands'
hyp = 'It is to insure the troops forever hearing the activity guidebook that party direct'
print(stm.sentence_stm(ref,
hyp,
nlp))
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for subtree_metric-0.2.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57e0d216314041e6af8249269776bcab1336c790d1f0d81c4fd4d7d24bfc82e1 |
|
MD5 | a2e5cc7b6a0b7bc70e021a1cbe272d7d |
|
BLAKE2b-256 | b470e85ec995e4c7d3daa9f990a2c5a2da25dd5b5e59cea68990f554910186fc |