Download tools/mosesdecoder/moses/Syntax/SymbolHasher.h from Quagmire1/wiki-cased: direct link, hf CLI and curl.
- Browser
- Download file 480 Bytes
-
https://huggingface.co/Quagmire1/wiki-cased/resolve/main/tools/mosesdecoder/moses/Syntax/SymbolHasher.h
- Command line
-
hf download hf://Quagmire1/wiki-cased/tools/mosesdecoder/moses/Syntax/SymbolHasher.h
-
curl -L -o SymbolHasher.h https://huggingface.co/Quagmire1/wiki-cased/resolve/main/tools/mosesdecoder/moses/Syntax/SymbolHasher.h
480 Bytes
| namespace Moses | |
| { | |
| namespace Syntax | |
| { | |
| // Assumes that only the first factor is relevant. i.e. factored decoding will | |
| // *not* work in moses_chart unless this is changed (among other things). | |
| class SymbolHasher | |
| { | |
| public: | |
| std::size_t operator()(const Word &s) const { | |
| const Factor *f = s[0]; | |
| return hash_value(*f); | |
| } | |
| }; | |
| } // namespace Syntax | |
| } // namespace Moses | |