Skip to content

Commit

Permalink
Fix issue with bias component in _v() (pattern.text)
Browse files Browse the repository at this point in the history
This fixes a bug introduced in dc85534 which causes the majority of unit tests in pattern.en (test_en.py) to fail.
Resolves #182.
  • Loading branch information
markus-beuckelmann committed Jul 28, 2017
1 parent 5f170bd commit 93235fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pattern/text/__init__.py
Expand Up @@ -445,7 +445,7 @@ def f(v, *s):
p = ("", "") if not p else (p[0] or "", p[1] or "")
n = ("", "") if not n else (n[0] or "", n[1] or "")
v = {}
f(v, "b", " ") # Bias.
f(v, "b", "b") # Bias.
f(v, "h", token[:1]) # Capitalization.
f(v, "w", token[-6:] if token not in self.known or token in self.unknown else "")
f(v, "x", token[-3:]) # Word suffix.
Expand Down

0 comments on commit 93235fe

Please sign in to comment.