Download tools/mosesdecoder/moses/Syntax/Manager.h from Quagmire1/wiki-cased: direct link, hf CLI and curl.
- Browser
- Download file 2.23 kB
-
https://huggingface.co/Quagmire1/wiki-cased/resolve/main/tools/mosesdecoder/moses/Syntax/Manager.h
- Command line
-
hf download hf://Quagmire1/wiki-cased/tools/mosesdecoder/moses/Syntax/Manager.h
-
curl -L -o Manager.h https://huggingface.co/Quagmire1/wiki-cased/resolve/main/tools/mosesdecoder/moses/Syntax/Manager.h
2.23 kB
| namespace Moses | |
| { | |
| namespace Syntax | |
| { | |
| // Common base class for Moses::Syntax managers. | |
| class Manager : public BaseManager | |
| { | |
| public: | |
| Manager(ttasksptr const& ttask); | |
| // Virtual functions from Moses::BaseManager that are implemented the same | |
| // way for all Syntax managers. | |
| void OutputBest(OutputCollector *collector) const; | |
| void OutputNBest(OutputCollector *collector) const; | |
| void OutputUnknowns(OutputCollector *collector) const; | |
| // Virtual functions from Moses::BaseManager that are no-ops for all Syntax | |
| // managers. | |
| void OutputAlignment(OutputCollector *collector) const {} | |
| void OutputDetailedTreeFragmentsTranslationReport( | |
| OutputCollector *collector) const {} | |
| void OutputLatticeSamples(OutputCollector *collector) const {} | |
| void OutputSearchGraph(OutputCollector *collector) const {} | |
| // void OutputSearchGraphHypergraph() const {} | |
| void | |
| OutputSearchGraphAsHypergraph | |
| ( std::string const& fname, size_t const precision ) const | |
| { } | |
| void OutputSearchGraphSLF() const {} | |
| void OutputWordGraph(OutputCollector *collector) const {} | |
| void OutputDetailedTranslationReport(OutputCollector *collector) const {} | |
| void CalcDecoderStatistics() const {} | |
| // Syntax-specific virtual functions that derived classes must implement. | |
| virtual void ExtractKBest( | |
| std::size_t k, | |
| std::vector<boost::shared_ptr<KBestExtractor::Derivation> > &kBestList, | |
| bool onlyDistinct=false) const = 0; | |
| virtual const SHyperedge *GetBestSHyperedge() const = 0; | |
| protected: | |
| boost::unordered_set<Word> m_oovs; | |
| private: | |
| // Syntax-specific helper functions used to implement OutputNBest. | |
| void OutputNBestList(OutputCollector *collector, | |
| const KBestExtractor::KBestVec &nBestList, | |
| long translationId) const; | |
| std::size_t OutputAlignmentNBest(Alignments &retAlign, | |
| const KBestExtractor::Derivation &d, | |
| std::size_t startTarget) const; | |
| std::size_t CalcSourceSize(const KBestExtractor::Derivation &d) const; | |
| }; | |
| } // Syntax | |
| } // Moses | |