Skip to content

Commit 45fa27d

Browse files
r-barnesfacebook-github-bot
authored andcommitted
c10::string_view -> std::string_view in /fbcode/pytorch/text/torchtext/csrc/bert_tokenizer.cpp
Summary: Public message about pytorch/text/torchtext/csrc/bert_tokenizer.cpp here Reviewed By: ezyang Differential Revision: D65543745 fbshipit-source-id: facdffc29f33f687b791e3cafe41d2112b851d41
1 parent 7ad02b7 commit 45fa27d

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
@@ -333,7 +333,7 @@ std::vector<int64_t> BERTEncoder::Encode(std::string text) {
333333
std::vector<std::string> tokens = Tokenize(text);
334334
std::vector<int64_t> indices(tokens.size());
335335
for (size_t i = 0; i < tokens.size(); i++) {
336-
indices[i] = vocab_.__getitem__(c10::string_view{tokens[i]});
336+
indices[i] = vocab_.__getitem__(std::string_view{tokens[i]});
337337
}
338338
return indices;
339339
}

0 commit comments

Comments
 (0)