Skip to content
This repository was archived by the owner on Sep 10, 2025. It is now read-only.

Commit 21a5cdf

Browse files
committed
fix logical operator
1 parent a508859 commit 21a5cdf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torchtext/csrc/bert_tokenizer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ UString BERTEncoder::_basic_tokenize(
244244
size_t len = token.size();
245245
for (size_t i = 0; i < len; i++) {
246246
uint32_t c = token[i];
247-
if (_is_chinese_char(c) || (_is_punct_char(c) and !is_never_split_token)) {
247+
if (_is_chinese_char(c) || (_is_punct_char(c) && !is_never_split_token)) {
248248
if (!ret.empty() && ret.back() != ' ') {
249249
ret.append(1, ' ');
250250
}

0 commit comments

Comments
 (0)