summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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