diff options
author | Chris Dyer <cdyer@cs.cmu.edu> | 2012-07-28 12:11:44 -0400 |
---|---|---|
committer | Chris Dyer <cdyer@cs.cmu.edu> | 2012-07-28 12:11:44 -0400 |
commit | 306e0ba4754c6c4f460536cfe8c3f118dc1cc175 (patch) | |
tree | ad5ea3b0a5370ac613d1bad715fe0f5ab8c91c11 /python/src/sa/rulefactory.pxi | |
parent | 934e55dc12c3f374684bc6a0797e6f85c7abb85a (diff) | |
parent | ee5e376e263d9aeabdeee6968b4457f53d3fc772 (diff) |
Merge branch 'master' of github.com:redpony/cdec
Diffstat (limited to 'python/src/sa/rulefactory.pxi')
-rw-r--r-- | python/src/sa/rulefactory.pxi | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/python/src/sa/rulefactory.pxi b/python/src/sa/rulefactory.pxi index 24bb680f..1c8d25a4 100644 --- a/python/src/sa/rulefactory.pxi +++ b/python/src/sa/rulefactory.pxi @@ -975,7 +975,6 @@ cdef class HieroCachingRuleFactory: continue phrase = prefix + (word_id,) - str_phrase = map(sym_tostring, phrase) hiero_phrase = Phrase(phrase) arity = hiero_phrase.arity() @@ -1019,7 +1018,7 @@ cdef class HieroCachingRuleFactory: else: # Suffix array search phrase_location = node.phrase_location - sa_range = self.fsa.lookup(str_phrase[-1], len(str_phrase)-1, phrase_location.sa_low, phrase_location.sa_high) + sa_range = self.fsa.lookup(sym_tostring(phrase[-1]), len(phrase)-1, phrase_location.sa_low, phrase_location.sa_high) if sa_range is not None: phrase_location = PhraseLocation(sa_low=sa_range[0], sa_high=sa_range[1]) else: |