Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/lm/const-arpa-lm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,7 @@ float ConstArpaLm::GetNgramLogprobRecurse(
// If <unk> is defined, then the word sequence should have already been
// mapped to <unk> is necessary; this is for the case where <unk> is not
// defined.
return std::numeric_limits<float>::min();
return -std::numeric_limits<float>::infinity();
} else {
Int32AndFloat logprob_i(*unigram_states_[word]);
return logprob_i.f;
Expand Down Expand Up @@ -1034,7 +1034,7 @@ bool ConstArpaLmDeterministicFst::GetArc(StateId s,
std::vector<Label> wseq = state_to_wseq_[s];

float logprob = lm_.GetNgramLogprob(ilabel, wseq);
if (logprob == std::numeric_limits<float>::min()) {
if (logprob == -std::numeric_limits<float>::infinity()) {
return false;
}

Expand Down