Skip to content

Commit f4cb30d

Browse files
committed
fix: drop explicit TokenType::BYTE for OpenFst compatibility (#359)
Both StringCompiler and StringPrinter default to BYTE mode, so the argument can be omitted entirely. This avoids the TokenType vs StringTokenType naming difference between the csukuangfj fork and official OpenFst releases.
1 parent 1abc4bd commit f4cb30d

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

runtime/processor/wetext_processor.cc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,13 @@
1414

1515
#include "processor/wetext_processor.h"
1616

17-
using fst::TokenType;
18-
1917
namespace wetext {
2018
Processor::Processor(const std::string& tagger_path,
2119
const std::string& verbalizer_path) {
2220
tagger_.reset(StdVectorFst::Read(tagger_path));
2321
verbalizer_.reset(StdVectorFst::Read(verbalizer_path));
24-
compiler_ = std::make_shared<StringCompiler<StdArc>>(TokenType::BYTE);
25-
printer_ = std::make_shared<StringPrinter<StdArc>>(TokenType::BYTE);
22+
compiler_ = std::make_shared<StringCompiler<StdArc>>();
23+
printer_ = std::make_shared<StringPrinter<StdArc>>();
2624

2725
if (tagger_path.find("zh_tn_") != tagger_path.npos) {
2826
parse_type_ = ParseType::kZH_TN;

0 commit comments

Comments
 (0)