Skip to content

Commit

Permalink
typo fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
csukuangfj committed Dec 23, 2023
1 parent 71212ac commit e9339ab
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion sherpa-onnx/csrc/offline-recognizer-ctc-impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ static OfflineRecognitionResult Convert(const OfflineCtcDecoderResult &src,
auto sym = sym_table[src.tokens[i]];
text.append(sym);

if (sym.size() == 1 and sym[0] != ' ') {
if (sym.size() == 1 && sym[0] != ' ') {
// for byte bpe models
std::ostringstream os;
os << "<0x" << std::hex << std::uppercase << static_cast<uint8_t>(sym[0])
Expand Down
2 changes: 1 addition & 1 deletion sherpa-onnx/csrc/offline-recognizer-transducer-impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ static OfflineRecognitionResult Convert(
auto sym = sym_table[i];
text.append(sym);

if (sym.size() == 1 and sym[0] != ' ') {
if (sym.size() == 1 && sym[0] != ' ') {
// for byte bpe models
std::ostringstream os;
os << "<0x" << std::hex << std::uppercase << static_cast<uint8_t>(sym[0])
Expand Down
2 changes: 1 addition & 1 deletion sherpa-onnx/csrc/online-recognizer-ctc-impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ static OnlineRecognizerResult Convert(const OnlineCtcDecoderResult &src,

r.text.append(sym);

if (sym.size() == 1 and sym[0] != ' ') {
if (sym.size() == 1 && sym[0] != ' ') {
// for byte bpe models
std::ostringstream os;
os << "<0x" << std::hex << std::uppercase << static_cast<uint8_t>(sym[0])
Expand Down
2 changes: 1 addition & 1 deletion sherpa-onnx/csrc/online-recognizer-transducer-impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ static OnlineRecognizerResult Convert(const OnlineTransducerDecoderResult &src,

r.text.append(sym);

if (sym.size() == 1 and sym[0] != ' ') {
if (sym.size() == 1 && sym[0] != ' ') {
// for byte bpe models
std::ostringstream os;
os << "<0x" << std::hex << std::uppercase << static_cast<uint8_t>(sym[0])
Expand Down

0 comments on commit e9339ab

Please sign in to comment.