Download mosesdecoder/moses/Syntax/S2T/DerivationWriter.h from suricodes/hindi-sindhi-docker: direct link, hf CLI and curl.
- Browser
- Download file 982 Bytes
-
https://huggingface.co/spaces/suricodes/hindi-sindhi-docker/resolve/main/mosesdecoder/moses/Syntax/S2T/DerivationWriter.h
- Command line
-
hf download hf://spaces/suricodes/hindi-sindhi-docker/mosesdecoder/moses/Syntax/S2T/DerivationWriter.h
-
curl -L -o DerivationWriter.h https://huggingface.co/spaces/suricodes/hindi-sindhi-docker/resolve/main/mosesdecoder/moses/Syntax/S2T/DerivationWriter.h
982 Bytes
| namespace Moses | |
| { | |
| namespace Syntax | |
| { | |
| struct SHyperedge; | |
| namespace S2T | |
| { | |
| // Writes a string representation of a derivation to a std::ostream. This is | |
| // used by the -translation-details / -T option. | |
| // TODO DerivationWriter currently assumes string-to-tree (which is why it's | |
| // TODO in the S2T namespace) but it would be easy to generalise it. This | |
| // TODO should be revisited when other the decoders are implemented. | |
| class DerivationWriter | |
| { | |
| public: | |
| // 1-best version. | |
| static void Write(const SHyperedge&, std::size_t, std::ostream &); | |
| // k-best version. | |
| static void Write(const KBestExtractor::Derivation &, std::size_t, | |
| std::ostream &); | |
| private: | |
| static void WriteLine(const SHyperedge &, std::size_t, std::ostream &); | |
| static void WriteSymbol(const Word &, std::ostream &); | |
| }; | |
| } // namespace S2T | |
| } // namespace Syntax | |
| } // namespace Moses | |