File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change 99
1010// Local
1111#include < pytorch/tokenizers/normalizer.h>
12- #include < pytorch/tokenizers/regex.h>
1312
1413// Third Party
1514#include < unicode.h>
1615
1716// Standard
1817#include < algorithm>
1918#include < iterator>
20- #include < memory>
21- #include < string>
2219#include < utility>
23- #include < vector>
2420
2521// Third Party
2622#include < nlohmann/json.hpp>
@@ -104,9 +100,8 @@ std::unique_ptr<IRegex> ReplaceNormalizer::create_regex_(
104100 assert (!pattern.empty ());
105101 auto regex_result = create_regex (pattern);
106102 if (!regex_result.ok ()) {
107- std::string error =
108- " Error: " + std::to_string (static_cast <int >(regex_result.error ()));
109- throw std::runtime_error (error);
103+ throw std::runtime_error (
104+ " Error: " + std::to_string (static_cast <int >(regex_result.error ())));
110105 }
111106 return std::move (regex_result.get ());
112107}
You can’t perform that action at this time.
0 commit comments