summaryrefslogtreecommitdiff
path: root/python/cdec/sa/features.py
diff options
context:
space:
mode:
authorMichael Denkowski <mdenkows@cs.cmu.edu>2014-03-06 15:35:10 -0800
committerMichael Denkowski <mdenkows@cs.cmu.edu>2014-03-06 15:35:10 -0800
commit256070339f557e295c1e90e9a451c82731d5c223 (patch)
tree7c34686446b2bcf0b6eb70114a6360c6ca14831b /python/cdec/sa/features.py
parent3b00351ff2047c226cde750fe67eae5b34388373 (diff)
Compile count-based bilex table for online grammar extraction.
Diffstat (limited to 'python/cdec/sa/features.py')
-rw-r--r--python/cdec/sa/features.py6
1 files changed, 0 insertions, 6 deletions
diff --git a/python/cdec/sa/features.py b/python/cdec/sa/features.py
index dcc60401..3e6af859 100644
--- a/python/cdec/sa/features.py
+++ b/python/cdec/sa/features.py
@@ -145,9 +145,3 @@ def CountExceptLM(vocab):
def CountExceptLM(ctx): # Word count in bitext (inc online data) but NOT mono text
return sum(1 for e in ctx.ephrase.words if e not in vocab)
return CountExceptLM
-
-def CountExceptLex(ttable):
- 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