Support replacing homonphonic phrases (#2153)
This commit is contained in:
@@ -239,6 +239,7 @@ class OfflineRecognizerCtcImpl : public OfflineRecognizerImpl {
|
||||
auto r = Convert(results[i], symbol_table_, frame_shift_ms,
|
||||
model_->SubsamplingFactor());
|
||||
r.text = ApplyInverseTextNormalization(std::move(r.text));
|
||||
r.text = ApplyHomophoneReplacer(std::move(r.text));
|
||||
ss[i]->SetResult(r);
|
||||
}
|
||||
}
|
||||
@@ -277,6 +278,7 @@ class OfflineRecognizerCtcImpl : public OfflineRecognizerImpl {
|
||||
auto r = Convert(results[0], symbol_table_, frame_shift_ms,
|
||||
model_->SubsamplingFactor());
|
||||
r.text = ApplyInverseTextNormalization(std::move(r.text));
|
||||
r.text = ApplyHomophoneReplacer(std::move(r.text));
|
||||
s->SetResult(r);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user