Permalink
Browse files

Fix issue with bias component in _v() (pattern.text)

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 93235fe6a554a247d97752204bfc3f7ade11a281
Showing with 1 addition and 1 deletion.
  1. +1 −1 pattern/text/__init__.py
@@ -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.

0 comments on commit 93235fe

Please sign in to comment.