🦉 Text comparison analytics and scoring
Score and map actual text versus expected text.
Demo: https://tyto.vonapp.co
Use it to compare actual text versus expected:
from tyto.score import get_score
actual_text = 'hello word'
expected_text = 'hello world'
score, maps = get_score(actual_text, expected_text)
score # 0.5
maps # [[0, -1]]
The score
indicates the ratio of words appearing in the correct order that are
found in expected text over the expected text word count.
The maps
is all possible index mappings of the actual words to expected words.
Actual words that are not found in expected words are a negative number.
Install requirements and start the server:
pip install -r requirements.txt
python app.py
Install package and dev requirements:
pip install -r requirements.txt
pip install pytest pytest-cov pylama
Run and benchmark tests:
pytest -v --duration=10 tests/