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))
Metadata
Release files for subtree-metric 0.2.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| subtree_metric-0.2.4-py3-none-any.whl | Python 3 | none | any | Details |
Release files / subtree_metric-0.2.4-py3-none-any.whl
| Download URL | subtree_metric-0.2.4-py3-none-any.whl |
|---|---|
| Size | 6.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
57e0d216314041e6af8249269776bcab1336c790d1f0d81c4fd4d7d24bfc82e1
|
|
BLAKE2b-256 checksum How to use checksums |
b470e85ec995e4c7d3daa9f990a2c5a2da25dd5b5e59cea68990f554910186fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.3.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4
|