Download tools/mosesdecoder/moses2/InMemoryTrie/utils.h from Quagmire1/wiki-cased: direct link, hf CLI and curl.
- Browser
- Download file 584 Bytes
-
https://huggingface.co/Quagmire1/wiki-cased/resolve/main/tools/mosesdecoder/moses2/InMemoryTrie/utils.h
- Command line
-
hf download hf://Quagmire1/wiki-cased/tools/mosesdecoder/moses2/InMemoryTrie/utils.h
-
curl -L -o utils.h https://huggingface.co/Quagmire1/wiki-cased/resolve/main/tools/mosesdecoder/moses2/InMemoryTrie/utils.h
584 Bytes
| using namespace std; | |
| namespace Moses2 | |
| { | |
| inline void ParseLineByChar(string& line, char c, vector<string>& substrings) | |
| { | |
| size_t i = 0; | |
| size_t j = line.find(c); | |
| while (j != string::npos) { | |
| substrings.push_back(line.substr(i, j - i)); | |
| i = ++j; | |
| j = line.find(c, j); | |
| if (j == string::npos) substrings.push_back(line.substr(i, line.length())); | |
| } | |
| } | |
| } | |