summaryrefslogtreecommitdiff
path: root/python/cdec/sa
diff options
context:
space:
mode:
Diffstat (limited to 'python/cdec/sa')
-rw-r--r--python/cdec/sa/features.py3
-rw-r--r--python/cdec/sa/rulefactory.pxi1
2 files changed, 3 insertions, 1 deletions
diff --git a/python/cdec/sa/features.py b/python/cdec/sa/features.py
index f5cbdb8d..dcc60401 100644
--- a/python/cdec/sa/features.py
+++ b/python/cdec/sa/features.py
@@ -147,6 +147,7 @@ def CountExceptLM(vocab):
return CountExceptLM
def CountExceptLex(ttable):
- def CountExceptLex(ctx): # Word count in online data but NOT original bitext
+ def CountExceptLex(ctx): # Word count in online data but NOT aligned in original bitext
+ # TODO: Check that online data actually contains aligned word when rulefactory TODO is addressed.
return sum(1 for e in ctx.ephrase.words if not ttable.contains_e_word(e))
return CountExceptLex
diff --git a/python/cdec/sa/rulefactory.pxi b/python/cdec/sa/rulefactory.pxi
index 2be5cad6..78a23196 100644
--- a/python/cdec/sa/rulefactory.pxi
+++ b/python/cdec/sa/rulefactory.pxi
@@ -2052,6 +2052,7 @@ cdef class HieroCachingRuleFactory:
stats.phrases_al[f_ph][e_ph] = al
# Update Bilexical counts
+ # TODO: use alignments instead of cooc
for e_w in e_words:
stats.bilex_e[e_w] += 1
for f_w in f_words: