Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
xuning
/
sherpaonnx
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
GlocKieHuan
2025-06-09 10:27:16 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
GitHub
2025-06-09 10:27:16 +0800
Commit
a135324c8ca5add577008162263443d4cd670df6
a135324c
1 parent
e13f7dbd
Fix isspace on windows in debug build (#2042)
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
2 行增加
和
2 行删除
sherpa-onnx/csrc/text-utils.cc
sherpa-onnx/csrc/text-utils.cc
查看文件 @
a135324
...
...
@@ -312,7 +312,7 @@ static std::vector<std::string> MergeCharactersIntoWords(
while
(
i
<
n
)
{
const
auto
&
w
=
words
[
i
];
if
(
w
.
size
()
>=
3
||
(
w
.
size
()
==
2
&&
!
IsSpecial
(
w
))
||
(
w
.
size
()
==
1
&&
(
IsPunct
(
w
[
0
])
||
std
::
isspace
(
w
[
0
]
))))
{
(
w
.
size
()
==
1
&&
(
IsPunct
(
w
[
0
])
||
std
::
isspace
(
static_cast
<
uint8_t
>
(
w
[
0
])
))))
{
if
(
prev
!=
-
1
)
{
std
::
string
t
;
for
(;
prev
<
i
;
++
prev
)
{
...
...
@@ -322,7 +322,7 @@ static std::vector<std::string> MergeCharactersIntoWords(
ans
.
push_back
(
std
::
move
(
t
));
}
if
(
!
std
::
isspace
(
w
[
0
]
))
{
if
(
!
std
::
isspace
(
static_cast
<
uint8_t
>
(
w
[
0
])
))
{
ans
.
push_back
(
w
);
}
++
i
;
...
...
请
注册
或
登录
后发表评论