summaryrefslogtreecommitdiff
path: root/python/cdec/sa/bilex.pxi
diff options
context:
space:
mode:
authorChris Dyer <cdyer@allegro.clab.cs.cmu.edu>2014-02-26 00:03:48 -0500
committerChris Dyer <cdyer@allegro.clab.cs.cmu.edu>2014-02-26 00:03:48 -0500
commit1cb85d42d12bdbe21f9f258fa50fcc1c73e8cfcc (patch)
treeac2f498f686be4e532c94b3d01537757f90d38f0 /python/cdec/sa/bilex.pxi
parent7c0ee6a2e22a1ace580ed1dcad65a4c591783135 (diff)
parent3cb43f4e3980457cbb7b749cee51a5bb777e18f8 (diff)
Merge branch 'master' of github.com:redpony/cdec
Diffstat (limited to 'python/cdec/sa/bilex.pxi')
-rw-r--r--python/cdec/sa/bilex.pxi8
1 files changed, 8 insertions, 0 deletions
diff --git a/python/cdec/sa/bilex.pxi b/python/cdec/sa/bilex.pxi
index 44bc0ce6..73ba99c1 100644
--- a/python/cdec/sa/bilex.pxi
+++ b/python/cdec/sa/bilex.pxi
@@ -249,6 +249,14 @@ cdef class BiLex:
fclose(f)
+ def contains_e_word(self, eword):
+ return (eword in self.eword2id)
+
+
+ def contains_f_word(self, fword):
+ return (fword in self.fword2id)
+
+
def get_e_id(self, eword):
if eword not in self.eword2id:
e_id = len(self.id2eword)