Download tools/mosesdecoder/moses/Syntax/RuleTableFF.h from Quagmire1/wiki-cased: direct link, hf CLI and curl.
- Browser
- Download file 1.39 kB
-
https://huggingface.co/Quagmire1/wiki-cased/resolve/main/tools/mosesdecoder/moses/Syntax/RuleTableFF.h
- Command line
-
hf download hf://Quagmire1/wiki-cased/tools/mosesdecoder/moses/Syntax/RuleTableFF.h
-
curl -L -o RuleTableFF.h https://huggingface.co/Quagmire1/wiki-cased/resolve/main/tools/mosesdecoder/moses/Syntax/RuleTableFF.h
1.39 kB
| namespace Moses | |
| { | |
| class ChartParser; | |
| class ChartCellCollectionBase; | |
| class AllOptions; | |
| namespace Syntax | |
| { | |
| class RuleTable; | |
| // Feature function for dealing with local rule scores (that come from a | |
| // rule table). The scores themselves are stored on TargetPhrase objects | |
| // and the decoder accesses them directly, so this object doesn't really do | |
| // anything except provide somewhere to store the weights and parameter values. | |
| class RuleTableFF : public PhraseDictionary | |
| { | |
| public: | |
| RuleTableFF(const std::string &); | |
| // FIXME Delete m_table? | |
| ~RuleTableFF() {} | |
| void Load(AllOptions::ptr const& opts); | |
| const RuleTable *GetTable() const { | |
| return m_table; | |
| } | |
| static const std::vector<RuleTableFF*> &Instances() { | |
| return s_instances; | |
| } | |
| ChartRuleLookupManager *CreateRuleLookupManager( | |
| const ChartParser &, const ChartCellCollectionBase &, std::size_t) { | |
| assert(false); | |
| return 0; | |
| } | |
| // Get the source terminal vocabulary for this table's grammar (as a set of | |
| // factor IDs) | |
| const boost::unordered_set<std::size_t> &GetSourceTerminalSet() const { | |
| return m_sourceTerminalSet; | |
| } | |
| private: | |
| static std::vector<RuleTableFF*> s_instances; | |
| const RuleTable *m_table; | |
| boost::unordered_set<std::size_t> m_sourceTerminalSet; | |
| }; | |
| } // Syntax | |
| } // Moses | |