summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorMichael Denkowski <mdenkows@cs.cmu.edu>2014-03-03 08:02:02 -0800
committerMichael Denkowski <mdenkows@cs.cmu.edu>2014-03-03 08:02:02 -0800
commit18aa808143ab06da361a557350f6b3dd964717ce (patch)
treef0c179494d93b0d4bad25d9e2f9c0a3c53c0387b /python
parent825d766c681827c83db9b473cb750a911644f6fd (diff)
typo fix
Diffstat (limited to 'python')
-rw-r--r--python/cdec/sa/_sa.cpp14
-rw-r--r--python/cdec/sa/rulefactory.pxi2
2 files changed, 8 insertions, 8 deletions
diff --git a/python/cdec/sa/_sa.cpp b/python/cdec/sa/_sa.cpp
index 0de8a1ef..c59fa22b 100644
--- a/python/cdec/sa/_sa.cpp
+++ b/python/cdec/sa/_sa.cpp
@@ -1,4 +1,4 @@
-/* Generated by Cython 0.19.2 on Mon Mar 3 07:56:22 2014 */
+/* Generated by Cython 0.19.2 on Mon Mar 3 08:00:58 2014 */
#define PY_SSIZE_T_CLEAN
#ifndef CYTHON_USE_PYLONG_INTERNALS
@@ -63450,7 +63450,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc
* for e_i in range(len(e_words)):
* f_i_aligned = aligned_ef[e_i] # <<<<<<<<<<<<<<
* lc = len(f_i_aligned)
- * if lc > 1:
+ * if lc > 0:
*/
__pyx_t_3 = PyObject_GetItem(((PyObject *)__pyx_v_aligned_ef), __pyx_v_e_i); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
@@ -63461,7 +63461,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc
* for e_i in range(len(e_words)):
* f_i_aligned = aligned_ef[e_i]
* lc = len(f_i_aligned) # <<<<<<<<<<<<<<
- * if lc > 1:
+ * if lc > 0:
* stats.bilex_e[e_words[e_i]] += 1
*/
__pyx_t_14 = PyObject_Length(__pyx_v_f_i_aligned); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2072; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -63473,18 +63473,18 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc
/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2073
* f_i_aligned = aligned_ef[e_i]
* lc = len(f_i_aligned)
- * if lc > 1: # <<<<<<<<<<<<<<
+ * if lc > 0: # <<<<<<<<<<<<<<
* stats.bilex_e[e_words[e_i]] += 1
* for f_i in f_i_aligned:
*/
- __pyx_t_3 = PyObject_RichCompare(__pyx_v_lc, __pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_lc, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_9) {
/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2074
* lc = len(f_i_aligned)
- * if lc > 1:
+ * if lc > 0:
* stats.bilex_e[e_words[e_i]] += 1 # <<<<<<<<<<<<<<
* for f_i in f_i_aligned:
* stats.bilex_ef[e_words[e_i]][f_words[f_i]] += (1.0) / lc
@@ -63504,7 +63504,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2075
- * if lc > 1:
+ * if lc > 0:
* stats.bilex_e[e_words[e_i]] += 1
* for f_i in f_i_aligned: # <<<<<<<<<<<<<<
* stats.bilex_ef[e_words[e_i]][f_words[f_i]] += (1.0) / lc
diff --git a/python/cdec/sa/rulefactory.pxi b/python/cdec/sa/rulefactory.pxi
index 37dd6d3b..044a78c8 100644
--- a/python/cdec/sa/rulefactory.pxi
+++ b/python/cdec/sa/rulefactory.pxi
@@ -2070,7 +2070,7 @@ cdef class HieroCachingRuleFactory:
for e_i in range(len(e_words)):
f_i_aligned = aligned_ef[e_i]
lc = len(f_i_aligned)
- if lc > 1:
+ if lc > 0:
stats.bilex_e[e_words[e_i]] += 1
for f_i in f_i_aligned:
stats.bilex_ef[e_words[e_i]][f_words[f_i]] += (1.0) / lc