kdho 0.1.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- kdho/__init__.py +16 -0
- kdho/_zeyrek.py +57 -0
- kdho/cli.py +66 -0
- kdho/core.py +164 -0
- kdho/normalize.py +65 -0
- kdho-0.1.1.dist-info/METADATA +119 -0
- kdho-0.1.1.dist-info/RECORD +10 -0
- kdho-0.1.1.dist-info/WHEEL +4 -0
- kdho-0.1.1.dist-info/entry_points.txt +2 -0
- kdho-0.1.1.dist-info/licenses/LICENSE +202 -0
kdho/__init__.py
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"""KDHO — Kök ve Ek Duyarlı Hata Oranı: a root- and affix-aware word error rate for Turkish ASR.
|
|
2
|
+
|
|
3
|
+
>>> import kdho
|
|
4
|
+
>>> kdho.kdho("ali eve geldi", "ali eve gelmedi") # negation flip → full error
|
|
5
|
+
0.3333333333333333
|
|
6
|
+
>>> kdho.kdho("evlerde geldik", "evlerden geldik") # one case suffix wrong → partial error
|
|
7
|
+
0.125
|
|
8
|
+
|
|
9
|
+
Corpus level: ``kdho.score(refs, hyps, verbalize_numbers=True)`` → {'kdho', 'wer', 'cer', ...}
|
|
10
|
+
"""
|
|
11
|
+
from .core import LAMBDA_DEFAULT, Alignment, align, analyze, explain, kdho, score, substitution_cost
|
|
12
|
+
from .normalize import normalize_text, number_to_words, turkish_lower, verbalize_numbers
|
|
13
|
+
|
|
14
|
+
__version__ = "0.1.1"
|
|
15
|
+
__all__ = ["kdho", "score", "explain", "align", "analyze", "substitution_cost", "Alignment", "LAMBDA_DEFAULT",
|
|
16
|
+
"normalize_text", "turkish_lower", "verbalize_numbers", "number_to_words", "__version__"]
|
kdho/_zeyrek.py
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"""Zeyrek 0.1.3 access with three fixes applied.
|
|
2
|
+
|
|
3
|
+
1. History dependence: the analyzer mutates shared phonetic-attribute sets in place (the cached result of
|
|
4
|
+
``calculate_phonetic_attributes`` and the root's ``stem_transition.attrs``), so the analysis of a word depended on
|
|
5
|
+
what had been analyzed before. Each analysis now works on its own copy.
|
|
6
|
+
2. Unknown words come back as a pseudo-analysis with lemma ``Unk``; callers treat them as out-of-vocabulary.
|
|
7
|
+
3. Candidate order is not stable; ``kdho.core`` picks a candidate with a deterministic rule.
|
|
8
|
+
Zeyrek also logs every analysis path at WARNING level ("APPENDING RESULT ..."); that logger is raised to ERROR.
|
|
9
|
+
"""
|
|
10
|
+
import logging
|
|
11
|
+
|
|
12
|
+
import zeyrek
|
|
13
|
+
import zeyrek.morphotactics as _zm
|
|
14
|
+
import zeyrek.rulebasedanalyzer as _zr
|
|
15
|
+
|
|
16
|
+
_orig_calc = _zr.calculate_phonetic_attributes
|
|
17
|
+
_zr.calculate_phonetic_attributes = lambda word, predecessor_attrs=None: set(_orig_calc(word, predecessor_attrs))
|
|
18
|
+
_orig_initial = _zm.SearchPath.initial.__func__
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def _initial_copy(cls, stem_transition, tail):
|
|
22
|
+
path = _orig_initial(cls, stem_transition, tail)
|
|
23
|
+
path.phonetic_attributes = set(path.phonetic_attributes)
|
|
24
|
+
return path
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
_zm.SearchPath.initial = classmethod(_initial_copy)
|
|
28
|
+
logging.getLogger("zeyrek.rulebasedanalyzer").setLevel(logging.ERROR)
|
|
29
|
+
_ANALYZER = None
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def _ensure_punkt():
|
|
33
|
+
import nltk # Zeyrek tokenizes its input with NLTK's punkt models
|
|
34
|
+
for pkg in ("punkt", "punkt_tab"):
|
|
35
|
+
try:
|
|
36
|
+
nltk.data.find(f"tokenizers/{pkg}")
|
|
37
|
+
except LookupError:
|
|
38
|
+
nltk.download(pkg, quiet=True)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def analyzer():
|
|
42
|
+
global _ANALYZER
|
|
43
|
+
if _ANALYZER is None:
|
|
44
|
+
_ensure_punkt()
|
|
45
|
+
_ANALYZER = zeyrek.MorphAnalyzer()
|
|
46
|
+
return _ANALYZER
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def candidates(word):
|
|
50
|
+
"""All real Zeyrek analyses of one (lowercased) word; empty list if unknown."""
|
|
51
|
+
if not any(ch.isalpha() for ch in word):
|
|
52
|
+
return []
|
|
53
|
+
try:
|
|
54
|
+
res = analyzer().analyze(word)
|
|
55
|
+
except Exception:
|
|
56
|
+
return []
|
|
57
|
+
return [c for c in (res[0] if res and res[0] else []) if c.lemma != "Unk"]
|
kdho/cli.py
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"""Command-line interface.
|
|
2
|
+
|
|
3
|
+
kdho explain "ali eve geldi" "ali eve gelmedi"
|
|
4
|
+
kdho score --ref refs.txt --hyp hyps.txt # one sentence per line
|
|
5
|
+
kdho score --jsonl outputs.jsonl --ref-key ref --hyp-key hyp --numbers --details
|
|
6
|
+
"""
|
|
7
|
+
import argparse
|
|
8
|
+
import json
|
|
9
|
+
import sys
|
|
10
|
+
|
|
11
|
+
from . import __version__
|
|
12
|
+
from .core import LAMBDA_DEFAULT, explain, score
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def _lines(path):
|
|
16
|
+
with open(path, encoding="utf-8") as f:
|
|
17
|
+
return [line.rstrip("\n") for line in f]
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def main(argv=None):
|
|
21
|
+
ap = argparse.ArgumentParser(prog="kdho", description="KDHO: root- and affix-aware error rate for Turkish ASR "
|
|
22
|
+
"(error rates, lower is better).")
|
|
23
|
+
ap.add_argument("--version", action="version", version=f"kdho {__version__}")
|
|
24
|
+
sub = ap.add_subparsers(dest="cmd", required=True)
|
|
25
|
+
common = argparse.ArgumentParser(add_help=False)
|
|
26
|
+
common.add_argument("--lam", type=float, default=LAMBDA_DEFAULT, help="partial affix cost scale (default 0.5)")
|
|
27
|
+
common.add_argument("--numbers", action="store_true", help="spell out digits in Turkish on both sides")
|
|
28
|
+
common.add_argument("--no-normalize", action="store_true", help="do not lowercase / strip punctuation")
|
|
29
|
+
|
|
30
|
+
e = sub.add_parser("explain", parents=[common], help="word-by-word alignment of one pair")
|
|
31
|
+
e.add_argument("reference")
|
|
32
|
+
e.add_argument("hypothesis")
|
|
33
|
+
|
|
34
|
+
s = sub.add_parser("score", parents=[common], help="corpus-level KDHO, WER and CER")
|
|
35
|
+
s.add_argument("--ref", help="reference file, one sentence per line")
|
|
36
|
+
s.add_argument("--hyp", help="hypothesis file, one sentence per line")
|
|
37
|
+
s.add_argument("--jsonl", help="JSONL file with one pair per line")
|
|
38
|
+
s.add_argument("--ref-key", default="reference")
|
|
39
|
+
s.add_argument("--hyp-key", default="hypothesis")
|
|
40
|
+
s.add_argument("--details", action="store_true", help="also print operation counts by type")
|
|
41
|
+
a = ap.parse_args(argv)
|
|
42
|
+
|
|
43
|
+
if a.cmd == "explain":
|
|
44
|
+
al = explain(a.reference, a.hypothesis, lam=a.lam, normalize=not a.no_normalize, verbalize_numbers=a.numbers)
|
|
45
|
+
w = max([len(r or "") for _, r, _, _ in al.steps] + [9])
|
|
46
|
+
print(f"{'reference':<{w}} {'hypothesis':<{w}} {'type':<9} cost")
|
|
47
|
+
for t, r, h, c in al.steps:
|
|
48
|
+
print(f"{r or '—':<{w}} {h or '—':<{w}} {t:<9} {c:.3f}")
|
|
49
|
+
print(f"\nKDHO = {al.kdho:.4f} ({al.cost:.3f} / {al.n_ref_words} reference words)")
|
|
50
|
+
return 0
|
|
51
|
+
|
|
52
|
+
if a.jsonl:
|
|
53
|
+
rows = [json.loads(line) for line in open(a.jsonl, encoding="utf-8") if line.strip()]
|
|
54
|
+
refs, hyps = [r[a.ref_key] for r in rows], [r[a.hyp_key] for r in rows]
|
|
55
|
+
elif a.ref and a.hyp:
|
|
56
|
+
refs, hyps = _lines(a.ref), _lines(a.hyp)
|
|
57
|
+
else:
|
|
58
|
+
ap.error("score needs --ref and --hyp, or --jsonl")
|
|
59
|
+
out = score(refs, hyps, lam=a.lam, normalize=not a.no_normalize, verbalize_numbers=a.numbers, return_details=a.details)
|
|
60
|
+
json.dump(out, sys.stdout, ensure_ascii=False, indent=2)
|
|
61
|
+
print()
|
|
62
|
+
return 0
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
if __name__ == "__main__":
|
|
66
|
+
sys.exit(main())
|
kdho/core.py
ADDED
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
"""KDHO core: word analysis, substitution cost, morphology-aware alignment, corpus score.
|
|
2
|
+
|
|
3
|
+
A(w) = (lemma, affix tags M, negation p, analyzable)
|
|
4
|
+
c(r, h) = 0 if r == h; 1 if an analysis is missing, the lemmas differ or the negation differs;
|
|
5
|
+
otherwise λ · Lev(M_r, M_h) / max(|M_r|, |M_h|, 1)
|
|
6
|
+
D(i,0) = i, D(0,j) = j, D(i,j) = min{D(i-1,j)+1, D(i,j-1)+1, D(i-1,j-1)+c(r_i,h_j)}, KDHO = D(N,K) / N
|
|
7
|
+
"""
|
|
8
|
+
from dataclasses import dataclass, field
|
|
9
|
+
from typing import Dict, Iterable, List, Optional, Tuple
|
|
10
|
+
|
|
11
|
+
import jiwer
|
|
12
|
+
|
|
13
|
+
from . import _zeyrek
|
|
14
|
+
from .normalize import normalize_text, turkish_lower, verbalize_numbers
|
|
15
|
+
|
|
16
|
+
LAMBDA_DEFAULT = 0.5
|
|
17
|
+
NEGATION_TAGS = {"Neg", "Unable"} # -mA negation and -(y)AmA inability
|
|
18
|
+
NEGATION_LEMMAS = {"değil"} # lexical negation
|
|
19
|
+
_EDGE_PUNCT = ".,;:!?\"'()[]{}«»“”‘’…-–—"
|
|
20
|
+
_CACHE: Dict[str, Tuple[str, tuple, bool, bool]] = {}
|
|
21
|
+
OP_TYPES = ("equal", "affix", "root", "negation", "oov", "deletion", "insertion")
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def analyze(word: str) -> Tuple[str, tuple, bool, bool]:
|
|
25
|
+
"""(lemma, affix tags without Neg, negated, analyzable) for one word, context-free.
|
|
26
|
+
|
|
27
|
+
Candidate choice is deterministic: non-proper-noun first, then fewest morphemes, then alphabetical.
|
|
28
|
+
A word counts as negated only if *every* analysis carries Neg/Unable (or its lemma is "değil"), so that the
|
|
29
|
+
-mA negation/infinitive ambiguity does not create spurious negation errors.
|
|
30
|
+
"""
|
|
31
|
+
w = turkish_lower(word)
|
|
32
|
+
if w not in _CACHE:
|
|
33
|
+
cands = _zeyrek.candidates(w)
|
|
34
|
+
if not cands:
|
|
35
|
+
_CACHE[w] = (w.strip(_EDGE_PUNCT) or w, (), False, False)
|
|
36
|
+
else:
|
|
37
|
+
p = min(cands, key=lambda c: (",Prop" in c.formatted, len(c.morphemes), c.formatted))
|
|
38
|
+
an = [(c.lemma, set(c.morphemes[1:])) for c in cands]
|
|
39
|
+
neg = any(lemma in NEGATION_LEMMAS for lemma, _ in an) or all(NEGATION_TAGS & tags for _, tags in an)
|
|
40
|
+
_CACHE[w] = (p.lemma, tuple(f for f in p.morphemes[1:] if f != "Neg"), neg, True)
|
|
41
|
+
return _CACHE[w]
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def _lev(a, b):
|
|
45
|
+
prev = list(range(len(b) + 1))
|
|
46
|
+
for i, x in enumerate(a, 1):
|
|
47
|
+
cur = [i]
|
|
48
|
+
for j, y in enumerate(b, 1):
|
|
49
|
+
cur.append(min(prev[j] + 1, cur[j - 1] + 1, prev[j - 1] + (x != y)))
|
|
50
|
+
prev = cur
|
|
51
|
+
return prev[-1]
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def substitution_cost(ref_word: str, hyp_word: str, lam: float = LAMBDA_DEFAULT) -> Tuple[float, str]:
|
|
55
|
+
"""Cost and type (equal / affix / root / negation / oov) of substituting ``hyp_word`` for ``ref_word``."""
|
|
56
|
+
sr = turkish_lower(ref_word).strip(_EDGE_PUNCT) or ref_word
|
|
57
|
+
sh = turkish_lower(hyp_word).strip(_EDGE_PUNCT) or hyp_word
|
|
58
|
+
if sr == sh:
|
|
59
|
+
return 0.0, "equal"
|
|
60
|
+
lr, mr, pr, okr = analyze(ref_word)
|
|
61
|
+
lh, mh, ph, okh = analyze(hyp_word)
|
|
62
|
+
if not (okr and okh):
|
|
63
|
+
return 1.0, "oov"
|
|
64
|
+
if turkish_lower(lr) != turkish_lower(lh):
|
|
65
|
+
return 1.0, "root"
|
|
66
|
+
if pr != ph:
|
|
67
|
+
return 1.0, "negation"
|
|
68
|
+
return lam * _lev(mr, mh) / max(len(mr), len(mh), 1), "affix"
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
@dataclass
|
|
72
|
+
class Alignment:
|
|
73
|
+
"""Result for one reference/hypothesis pair."""
|
|
74
|
+
cost: float
|
|
75
|
+
n_ref_words: int
|
|
76
|
+
ops: Dict[str, int]
|
|
77
|
+
steps: List[Tuple[str, Optional[str], Optional[str], float]] = field(default_factory=list) # (type, ref, hyp, cost)
|
|
78
|
+
|
|
79
|
+
@property
|
|
80
|
+
def kdho(self) -> float:
|
|
81
|
+
return self.cost / self.n_ref_words if self.n_ref_words else 0.0
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
def align(reference: str, hypothesis: str, lam: float = LAMBDA_DEFAULT) -> Alignment:
|
|
85
|
+
"""Morphology-aware alignment of two already-normalized strings (split on whitespace)."""
|
|
86
|
+
R, H = reference.split(), hypothesis.split()
|
|
87
|
+
N, K = len(R), len(H)
|
|
88
|
+
ops = dict.fromkeys(OP_TYPES, 0)
|
|
89
|
+
C = [[substitution_cost(r, h, lam) for h in H] for r in R]
|
|
90
|
+
D = [[0.0] * (K + 1) for _ in range(N + 1)]
|
|
91
|
+
for i in range(1, N + 1):
|
|
92
|
+
D[i][0] = i
|
|
93
|
+
for j in range(1, K + 1):
|
|
94
|
+
D[0][j] = j
|
|
95
|
+
for i in range(1, N + 1):
|
|
96
|
+
for j in range(1, K + 1):
|
|
97
|
+
D[i][j] = min(D[i - 1][j] + 1, D[i][j - 1] + 1, D[i - 1][j - 1] + C[i - 1][j - 1][0])
|
|
98
|
+
steps = []
|
|
99
|
+
i, j = N, K
|
|
100
|
+
while i > 0 or j > 0: # backtrace; ties prefer the diagonal
|
|
101
|
+
if i > 0 and j > 0 and abs(D[i][j] - (D[i - 1][j - 1] + C[i - 1][j - 1][0])) < 1e-12:
|
|
102
|
+
c, t = C[i - 1][j - 1]
|
|
103
|
+
steps.append((t, R[i - 1], H[j - 1], c))
|
|
104
|
+
i, j = i - 1, j - 1
|
|
105
|
+
elif i > 0 and abs(D[i][j] - (D[i - 1][j] + 1)) < 1e-12:
|
|
106
|
+
steps.append(("deletion", R[i - 1], None, 1.0))
|
|
107
|
+
i -= 1
|
|
108
|
+
else:
|
|
109
|
+
steps.append(("insertion", None, H[j - 1], 1.0))
|
|
110
|
+
j -= 1
|
|
111
|
+
steps.reverse()
|
|
112
|
+
for t, *_ in steps:
|
|
113
|
+
ops[t] += 1
|
|
114
|
+
return Alignment(cost=D[N][K], n_ref_words=N, ops=ops, steps=steps)
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
def prepare(text: str, normalize: bool = True, numbers: bool = False) -> str:
|
|
118
|
+
if numbers:
|
|
119
|
+
text = verbalize_numbers(text)
|
|
120
|
+
return normalize_text(text) if normalize else " ".join(text.split())
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
def score(references: Iterable[str], hypotheses: Iterable[str], lam: float = LAMBDA_DEFAULT, normalize: bool = True,
|
|
124
|
+
verbalize_numbers: bool = False, return_details: bool = False) -> dict:
|
|
125
|
+
"""Corpus-level KDHO (total cost / total reference words) plus WER and CER on the same normalized text.
|
|
126
|
+
|
|
127
|
+
All three are error rates: lower is better. Pairs with an empty reference are skipped.
|
|
128
|
+
"""
|
|
129
|
+
refs, hyps = list(references), list(hypotheses)
|
|
130
|
+
if len(refs) != len(hyps):
|
|
131
|
+
raise ValueError(f"{len(refs)} references but {len(hyps)} hypotheses")
|
|
132
|
+
cost, n = 0.0, 0
|
|
133
|
+
ops = dict.fromkeys(OP_TYPES, 0)
|
|
134
|
+
R, H = [], []
|
|
135
|
+
for r, h in zip(refs, hyps):
|
|
136
|
+
r, h = prepare(r, normalize, verbalize_numbers), prepare(h, normalize, verbalize_numbers)
|
|
137
|
+
if not r:
|
|
138
|
+
continue
|
|
139
|
+
a = align(r, h, lam)
|
|
140
|
+
cost, n = cost + a.cost, n + a.n_ref_words
|
|
141
|
+
for k, v in a.ops.items():
|
|
142
|
+
ops[k] += v
|
|
143
|
+
R.append(r)
|
|
144
|
+
H.append(h)
|
|
145
|
+
out = {"kdho": cost / n if n else 0.0,
|
|
146
|
+
"wer": jiwer.wer(R, H) if R else 0.0,
|
|
147
|
+
"cer": jiwer.cer(R, H) if R else 0.0,
|
|
148
|
+
"n_sentences": len(R), "n_ref_words": n}
|
|
149
|
+
if return_details:
|
|
150
|
+
out["ops"] = ops
|
|
151
|
+
return out
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
def kdho(references, hypotheses, **kwargs) -> float:
|
|
155
|
+
"""Corpus-level KDHO for lists of strings, or for a single reference/hypothesis pair."""
|
|
156
|
+
if isinstance(references, str):
|
|
157
|
+
references, hypotheses = [references], [hypotheses]
|
|
158
|
+
return score(references, hypotheses, **kwargs)["kdho"]
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
def explain(reference: str, hypothesis: str, lam: float = LAMBDA_DEFAULT, normalize: bool = True,
|
|
162
|
+
verbalize_numbers: bool = False) -> Alignment:
|
|
163
|
+
"""Word-by-word alignment with the type and cost of every operation (for inspection)."""
|
|
164
|
+
return align(prepare(reference, normalize, verbalize_numbers), prepare(hypothesis, normalize, verbalize_numbers), lam)
|
kdho/normalize.py
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"""Turkish text normalization for ASR scoring and a rule-based Turkish number verbalizer."""
|
|
2
|
+
import re
|
|
3
|
+
import unicodedata
|
|
4
|
+
|
|
5
|
+
_PUNCT = re.compile(r"[^\w\s']|(?<!\w)'|'(?!\w)")
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def turkish_lower(text: str) -> str:
|
|
9
|
+
"""Lowercase with Turkish dotted/dotless i (I→ı, İ→i); also folds a decomposed i + U+0307 to i."""
|
|
10
|
+
return text.replace("İ", "i").replace("I", "ı").lower().replace("i̇", "i")
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def normalize_text(text: str) -> str:
|
|
14
|
+
"""NFC → Turkish lowercase → punctuation removed (word-internal apostrophes kept) → whitespace collapsed."""
|
|
15
|
+
text = turkish_lower(unicodedata.normalize("NFC", text))
|
|
16
|
+
return " ".join(_PUNCT.sub(" ", text).split())
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
_ONES = ["", "bir", "iki", "üç", "dört", "beş", "altı", "yedi", "sekiz", "dokuz"]
|
|
20
|
+
_TENS = ["", "on", "yirmi", "otuz", "kırk", "elli", "altmış", "yetmiş", "seksen", "doksan"]
|
|
21
|
+
_SCALES = [(10 ** 12, "trilyon"), (10 ** 9, "milyar"), (10 ** 6, "milyon"), (1000, "bin")]
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def _below_1000(n):
|
|
25
|
+
h, r = divmod(n, 100)
|
|
26
|
+
t, o = divmod(r, 10)
|
|
27
|
+
out = (["yüz"] if h == 1 else [_ONES[h], "yüz"]) if h else []
|
|
28
|
+
return out + ([_TENS[t]] if t else []) + ([_ONES[o]] if o else [])
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def number_to_words(n: int) -> str:
|
|
32
|
+
"""Turkish reading of a non-negative integer (TDK spelling: words separated, no "bir bin")."""
|
|
33
|
+
if n == 0:
|
|
34
|
+
return "sıfır"
|
|
35
|
+
out = []
|
|
36
|
+
for val, name in _SCALES:
|
|
37
|
+
q, n = divmod(n, val)
|
|
38
|
+
if q:
|
|
39
|
+
out += [name] if (q == 1 and name == "bin") else number_to_words(q).split() + [name]
|
|
40
|
+
return " ".join(out + _below_1000(n))
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def _digits(s):
|
|
44
|
+
s = s.lstrip("0") or "0"
|
|
45
|
+
return number_to_words(int(s)) if len(s) <= 15 else " ".join(_ONES[int(c)] or "sıfır" for c in s)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def _frac(s):
|
|
49
|
+
z = len(s) - len(s.lstrip("0"))
|
|
50
|
+
return " ".join(["sıfır"] * z + ([_digits(s.lstrip("0"))] if s.lstrip("0") else []))
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def verbalize_numbers(text: str) -> str:
|
|
54
|
+
"""Spell out digits in Turkish.
|
|
55
|
+
|
|
56
|
+
``%50`` → yüzde elli · ``1.000.000`` → bir milyon · ``3,5`` → üç virgül beş · ``14:30`` → on dört otuz ·
|
|
57
|
+
``1990'da`` → bin dokuz yüz doksanda (the apostrophe suffix already follows the pronunciation).
|
|
58
|
+
Ordinals ("1.") are left alone because they are ambiguous with a sentence-final period.
|
|
59
|
+
"""
|
|
60
|
+
text = re.sub(r"%\s?(\d+(?:[.,]\d+)?)", lambda m: "yüzde " + m.group(1), text)
|
|
61
|
+
text = re.sub(r"\b\d{1,3}(?:\.\d{3})+\b(?![.,]\d)", lambda m: m.group(0).replace(".", ""), text)
|
|
62
|
+
text = re.sub(r"\b(\d{1,2}):(\d{2})\b", lambda m: _digits(m.group(1)) + " " + _digits(m.group(2)), text)
|
|
63
|
+
text = re.sub(r"\b(\d+),(\d+)\b", lambda m: _digits(m.group(1)) + " virgül " + _frac(m.group(2)), text)
|
|
64
|
+
text = re.sub(r"(\d+)'(\w+)", lambda m: _digits(m.group(1)) + m.group(2), text)
|
|
65
|
+
return " ".join(re.sub(r"\d+", lambda m: " " + _digits(m.group(0)) + " ", text).split())
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: kdho
|
|
3
|
+
Version: 0.1.1
|
|
4
|
+
Summary: KDHO: a root- and affix-aware word error rate for Turkish speech recognition
|
|
5
|
+
Author: Nur Yağmur Tuncer
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Keywords: asr,evaluation,metric,morphology,speech recognition,turkish,wer
|
|
9
|
+
Classifier: Development Status :: 4 - Beta
|
|
10
|
+
Classifier: Intended Audience :: Science/Research
|
|
11
|
+
Classifier: Natural Language :: Turkish
|
|
12
|
+
Classifier: Operating System :: OS Independent
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
15
|
+
Classifier: Topic :: Text Processing :: Linguistic
|
|
16
|
+
Requires-Python: >=3.9
|
|
17
|
+
Requires-Dist: jiwer>=3.0
|
|
18
|
+
Requires-Dist: nltk>=3.8
|
|
19
|
+
Requires-Dist: zeyrek==0.1.3
|
|
20
|
+
Provides-Extra: test
|
|
21
|
+
Requires-Dist: pytest>=7; extra == 'test'
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
|
|
24
|
+
# kdho
|
|
25
|
+
|
|
26
|
+
**KDHO** (*Kök ve Ek Duyarlı Hata Oranı*, Root- and Affix-Aware Error Rate) is a word error rate for Turkish speech
|
|
27
|
+
recognition that understands morphology.
|
|
28
|
+
|
|
29
|
+
Turkish is agglutinative: one word carries a root and a chain of suffixes. WER counts *evlerde → evlerden* (one case
|
|
30
|
+
suffix wrong) exactly like *evlerde → okullarda* (a different word) or *geldi → gelmedi* (meaning reversed). KDHO keeps
|
|
31
|
+
the word as the unit, but prices each substitution with a morphological analysis of the two words:
|
|
32
|
+
|
|
33
|
+
| Case | Cost |
|
|
34
|
+
|---|---|
|
|
35
|
+
| identical words | 0 |
|
|
36
|
+
| different roots | 1 |
|
|
37
|
+
| negation differs (*-mA*, *-(y)AmA*, *değil*) | 1 |
|
|
38
|
+
| either word cannot be analyzed | 1 |
|
|
39
|
+
| same root, affix difference | λ · d_M (normalized edit distance between affix tags, λ = 0.5) |
|
|
40
|
+
|
|
41
|
+
Deletions and insertions cost 1 and the cost is used inside the alignment, so **0 ≤ KDHO ≤ WER** always holds.
|
|
42
|
+
All scores are error rates: **lower is better**.
|
|
43
|
+
|
|
44
|
+
## Install
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
pip install kdho
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Use
|
|
51
|
+
|
|
52
|
+
```python
|
|
53
|
+
import kdho
|
|
54
|
+
|
|
55
|
+
kdho.kdho("ali eve geldi", "ali eve gelmedi") # 0.333 negation flip → full error
|
|
56
|
+
kdho.kdho("evlerde geldik", "evlerden geldik") # 0.125 one case suffix wrong → partial error
|
|
57
|
+
|
|
58
|
+
kdho.score(references, hypotheses) # corpus level
|
|
59
|
+
# {'kdho': 0.113, 'wer': 0.128, 'cer': 0.070, 'n_sentences': 5200, 'n_ref_words': 61234}
|
|
60
|
+
|
|
61
|
+
kdho.score(references, hypotheses, verbalize_numbers=True, return_details=True)
|
|
62
|
+
# digits spelled out on both sides (48 → kırk sekiz); 'ops' counts equal/affix/root/negation/oov/deletion/insertion
|
|
63
|
+
|
|
64
|
+
for step in kdho.explain("bu kitapları yarın okumayacağım", "bu kitabı yarın okuyacağım").steps:
|
|
65
|
+
print(step)
|
|
66
|
+
# ('equal', 'bu', 'bu', 0.0)
|
|
67
|
+
# ('affix', 'kitapları', 'kitabı', 0.25)
|
|
68
|
+
# ('equal', 'yarın', 'yarın', 0.0)
|
|
69
|
+
# ('negation', 'okumayacağım', 'okuyacağım', 1.0)
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Command line
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
kdho explain "ali eve geldi" "ali eve gelmedi"
|
|
76
|
+
kdho score --ref refs.txt --hyp hyps.txt --numbers --details # one sentence per line
|
|
77
|
+
kdho score --jsonl outputs.jsonl --ref-key ref_norm --hyp-key hyp_norm
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Options
|
|
81
|
+
|
|
82
|
+
| Argument | Default | Meaning |
|
|
83
|
+
|---|---|---|
|
|
84
|
+
| `lam` | 0.5 | scale of the partial affix cost (0 = ignore affix errors, 1 = proportional full cost) |
|
|
85
|
+
| `normalize` | True | NFC, Turkish lowercasing (I→ı, İ→i), punctuation removal; word-internal apostrophes (*Ankara'ya*) kept |
|
|
86
|
+
| `verbalize_numbers` | False | spell out digits in Turkish: *%50* → *yüzde elli*, *1990'da* → *bin dokuz yüz doksanda* |
|
|
87
|
+
| `return_details` | False | add operation counts by type |
|
|
88
|
+
|
|
89
|
+
Helpers: `kdho.normalize_text`, `kdho.turkish_lower`, `kdho.verbalize_numbers`, `kdho.number_to_words`,
|
|
90
|
+
`kdho.substitution_cost`, `kdho.analyze`.
|
|
91
|
+
|
|
92
|
+
## Validation
|
|
93
|
+
|
|
94
|
+
On a balanced Turkish test set (7 sources × 743 utterances, 14 open ASR models):
|
|
95
|
+
|
|
96
|
+
- Agreement with human meaning-change ratings (Spearman ρ, 48 pairs): KDHO 0.83, WER 0.75.
|
|
97
|
+
- Negation errors, 3 independent raters: agreement with the human ordering KDHO 78 %, CER 52 %.
|
|
98
|
+
- 72,800 system outputs: a negation error is ranked above a character-matched affix error 97 % of the time by KDHO,
|
|
99
|
+
67 % by CER.
|
|
100
|
+
|
|
101
|
+
## Notes and limitations
|
|
102
|
+
|
|
103
|
+
- Morphological analysis uses [Zeyrek](https://github.com/obulat/zeyrek) 0.1.3 (pinned). `kdho` fixes three issues of
|
|
104
|
+
that version at import time: history-dependent analyses, a fake `Unk` analysis for unknown words, and unstable
|
|
105
|
+
candidate order. Results are deterministic.
|
|
106
|
+
- Analysis is context-free; spelling variants (*olacak/olucak*) and synonyms count as full errors.
|
|
107
|
+
- The first call downloads NLTK's `punkt` tokenizer if it is missing.
|
|
108
|
+
|
|
109
|
+
## Citation
|
|
110
|
+
|
|
111
|
+
```bibtex
|
|
112
|
+
@misc{kdho2026,
|
|
113
|
+
title = {KDHO: A Root- and Affix-Aware Error Rate for Turkish Speech Recognition},
|
|
114
|
+
year = {2026},
|
|
115
|
+
note = {Under review}
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
License: Apache-2.0.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
kdho/__init__.py,sha256=BaL0Q4MYm1_SEttF657YpR3QQOHFGz4140d5dza8el4,858
|
|
2
|
+
kdho/_zeyrek.py,sha256=D4h3tfFK5dX7iDbKuLRw7V4zq2XY43Z6n4H4KimIiSk,2057
|
|
3
|
+
kdho/cli.py,sha256=C7NI6c92gQ40MQPOP4kfqx1Lb55BQRsi4TD4MWlFJXc,3019
|
|
4
|
+
kdho/core.py,sha256=AmdGRgAxchoocWYxgZW5zwlrvqHa3pzIzK0MwWWU5gI,6861
|
|
5
|
+
kdho/normalize.py,sha256=T9Y6k3RJgjqckY5tGjIEz-fR2Pwm4-Wsp30qIMBZ-xo,2849
|
|
6
|
+
kdho-0.1.1.dist-info/METADATA,sha256=fLv__GXLtdUuKhUPCOST7kCo1ozj_W8e-GqAkY-RNkU,4657
|
|
7
|
+
kdho-0.1.1.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
|
|
8
|
+
kdho-0.1.1.dist-info/entry_points.txt,sha256=O84p7roVTRmxytK32l75gGFBe2N7aSADoPmaaDpgzjw,39
|
|
9
|
+
kdho-0.1.1.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
|
10
|
+
kdho-0.1.1.dist-info/RECORD,,
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|