diff options
author | Michael Denkowski <mdenkows@cs.cmu.edu> | 2014-03-06 15:35:10 -0800 |
---|---|---|
committer | Michael Denkowski <mdenkows@cs.cmu.edu> | 2014-03-06 15:35:10 -0800 |
commit | a49f3a5b19547e7e46a652b22fab601da8fc210f (patch) | |
tree | e601ada49b2751344d14175b005182ca842a29cf /python/cdec/sa/features.py | |
parent | 18aa808143ab06da361a557350f6b3dd964717ce (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.py | 6 |
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 |