diff --git a/.github/workflows/runtime.yml b/.github/workflows/runtime.yml new file mode 100644 index 0000000..c8582b4 --- /dev/null +++ b/.github/workflows/runtime.yml @@ -0,0 +1,22 @@ +name: Runtime Build + +on: + workflow_dispatch: + pull_request: + paths: + - 'runtime/**' + - '.github/workflows/runtime.yml' + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest] + steps: + - uses: actions/checkout@v4 + - name: Build runtime + run: | + cmake -B build -S runtime -DBUILD_TESTING=OFF + cmake --build build -j$(nproc 2>/dev/null || sysctl -n hw.ncpu) diff --git a/runtime/processor/wetext_processor.cc b/runtime/processor/wetext_processor.cc index a6f6168..dd342b4 100644 --- a/runtime/processor/wetext_processor.cc +++ b/runtime/processor/wetext_processor.cc @@ -14,15 +14,13 @@ #include "processor/wetext_processor.h" -using fst::TokenType; - namespace wetext { Processor::Processor(const std::string& tagger_path, const std::string& verbalizer_path) { tagger_.reset(StdVectorFst::Read(tagger_path)); verbalizer_.reset(StdVectorFst::Read(verbalizer_path)); - compiler_ = std::make_shared>(TokenType::BYTE); - printer_ = std::make_shared>(TokenType::BYTE); + compiler_ = std::make_shared>(); + printer_ = std::make_shared>(); if (tagger_path.find("zh_tn_") != tagger_path.npos) { parse_type_ = ParseType::kZH_TN;