summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorMichael Denkowski <michael.j.denkowski@gmail.com>2012-12-23 22:43:43 -0500
committerMichael Denkowski <michael.j.denkowski@gmail.com>2012-12-23 22:43:43 -0500
commitd01276872ca6307ce7f6ee0c6db2f9244e6ab378 (patch)
tree30285cab2cbc21683d3897ff70c8355842be5a7b /python
parentcfb1ea5f6b77e87dc28a20116a58f04823501f53 (diff)
Working test
Diffstat (limited to 'python')
-rwxr-xr-xpython/src/sa/online_extractor.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/python/src/sa/online_extractor.py b/python/src/sa/online_extractor.py
index 8aae3959..03a46b3b 100755
--- a/python/src/sa/online_extractor.py
+++ b/python/src/sa/online_extractor.py
@@ -94,6 +94,7 @@ class OnlineGrammarExtractor:
phrases = set()
f_len = len(f_words)
+ e_len = len(e_words)
# Pre-compute alignment info
al = [[] for i in range(f_len)]
@@ -105,7 +106,7 @@ class OnlineGrammarExtractor:
# Target side word coverage
# TODO: Does Cython do bit vectors?
- cover = [0] * f_len
+ cover = [0] * e_len
# Extract all possible hierarchical phrases starting at a source index
# f_ i and j are current, e_ i and j are previous