Skip to content

Commit a61d874

Browse files
EyalLaviMikeSmithEU
authored andcommitted
Docs/iss30/document diff (#93)
* Documented params and diff algo * Update core.py * Fixed trailing spaces * Update core.py * Moved param tags * PEP: remove trailing spaces
1 parent 278263a commit a61d874

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/benchmarkstt/metrics/core.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,17 @@ class WER(Base):
8080
number of reference words
8181
8282
See: https://en.wikipedia.org/wiki/Word_error_rate
83+
84+
Insertions, deletions and substitutions are
85+
identified using the Hunt–McIlroy diff algorithm.
86+
This algorithm is the one used internally by Python.
87+
See https://docs.python.org/3/library/difflib.html
88+
89+
:param mode: WER variant. 'strict' is the default. 'hunt' applies 0.5 weight to insertions and deletions.
90+
:param differ_class: For future use.
8391
"""
8492

85-
# TODO: proper documenting of different modes
93+
# WER modes
8694
MODE_STRICT = 'strict'
8795
MODE_HUNT = 'hunt'
8896

0 commit comments

Comments
 (0)