Skip to content
Merged
Show file tree
Hide file tree
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
22 changes: 22 additions & 0 deletions .github/workflows/runtime.yml
Original file line number Diff line number Diff line change
@@ -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)
6 changes: 2 additions & 4 deletions runtime/processor/wetext_processor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<StringCompiler<StdArc>>(TokenType::BYTE);
printer_ = std::make_shared<StringPrinter<StdArc>>(TokenType::BYTE);
compiler_ = std::make_shared<StringCompiler<StdArc>>();
printer_ = std::make_shared<StringPrinter<StdArc>>();

if (tagger_path.find("zh_tn_") != tagger_path.npos) {
parse_type_ = ParseType::kZH_TN;
Expand Down
Loading