summaryrefslogtreecommitdiffstats
path: root/src/lookup/phrase_lookup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lookup/phrase_lookup.cpp')
-rw-r--r--src/lookup/phrase_lookup.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lookup/phrase_lookup.cpp b/src/lookup/phrase_lookup.cpp
index c176773..e1c4604 100644
--- a/src/lookup/phrase_lookup.cpp
+++ b/src/lookup/phrase_lookup.cpp
@@ -180,9 +180,9 @@ phrase_token_t token){
if ( m_phrase_index->get_phrase_item(token, m_cache_phrase_item))
return false;
size_t phrase_length = m_cache_phrase_item.get_phrase_length();
- gfloat elem_poss = m_cache_phrase_item.get_unigram_frequency() / (gfloat)
+ gdouble elem_poss = m_cache_phrase_item.get_unigram_frequency() / (gdouble)
m_phrase_index->get_phrase_index_total_freq();
- if ( elem_poss < FLT_EPSILON )
+ if ( elem_poss < DBL_EPSILON )
return false;
lookup_value_t next_value;
@@ -197,10 +197,10 @@ bool PhraseLookup::bigram_gen_next_step(int nstep, lookup_value_t * cur_value, p
if ( m_phrase_index->get_phrase_item(token, m_cache_phrase_item))
return false;
size_t phrase_length = m_cache_phrase_item.get_phrase_length();
- gfloat unigram_poss = m_cache_phrase_item.get_unigram_frequency() /
- (gfloat) m_phrase_index->get_phrase_index_total_freq();
+ gdouble unigram_poss = m_cache_phrase_item.get_unigram_frequency() /
+ (gdouble) m_phrase_index->get_phrase_index_total_freq();
- if ( bigram_poss < FLT_EPSILON && unigram_poss < FLT_EPSILON )
+ if ( bigram_poss < FLT_EPSILON && unigram_poss < DBL_EPSILON )
return false;
lookup_value_t next_value;