Skip to content

Commit

Permalink
fix style issues
Browse files Browse the repository at this point in the history
  • Loading branch information
csukuangfj committed May 10, 2024
1 parent ab2643c commit c1af6ef
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions sherpa-onnx/csrc/offline-punctuation-ct-transformer-impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
#ifndef SHERPA_ONNX_CSRC_OFFLINE_PUNCTUATION_CT_TRANSFORMER_IMPL_H_
#define SHERPA_ONNX_CSRC_OFFLINE_PUNCTUATION_CT_TRANSFORMER_IMPL_H_

#include <math.h>

#include <memory>
#include <string>
#include <utility>
#include <vector>
#include <math.h>

#if __ANDROID_API__ >= 9
#include "android/asset_manager.h"
Expand Down Expand Up @@ -61,7 +62,9 @@ class OfflinePunctuationCtTransformerImpl : public OfflinePunctuationImpl {

int32_t segment_size = 20;
int32_t max_len = 200;
int32_t num_segments = ceil(((float)token_ids.size() + segment_size - 1) / segment_size);
int32_t num_segments =
ceil((static_cast<float>(token_ids.size()) + segment_size - 1) /
segment_size);

std::vector<int32_t> punctuations;
int32_t last = -1;
Expand Down

0 comments on commit c1af6ef

Please sign in to comment.