Download tools/mosesdecoder/moses/Syntax/InputWeightFF.cpp from Quagmire1/wiki-cased: direct link, hf CLI and curl.
- Browser
- Download file 1.11 kB
-
https://huggingface.co/Quagmire1/wiki-cased/resolve/main/tools/mosesdecoder/moses/Syntax/InputWeightFF.cpp
- Command line
-
hf download hf://Quagmire1/wiki-cased/tools/mosesdecoder/moses/Syntax/InputWeightFF.cpp
-
curl -L -o InputWeightFF.cpp https://huggingface.co/Quagmire1/wiki-cased/resolve/main/tools/mosesdecoder/moses/Syntax/InputWeightFF.cpp
1.11 kB
| namespace Moses | |
| { | |
| namespace Syntax | |
| { | |
| InputWeightFF::InputWeightFF(const std::string &line) | |
| : StatelessFeatureFunction(1, line) | |
| { | |
| ReadParameters(); | |
| } | |
| void InputWeightFF::EvaluateWhenApplied(const Hypothesis& hypo, | |
| ScoreComponentCollection* accumulator) const | |
| { | |
| // TODO Throw exception. | |
| assert(false); | |
| } | |
| void InputWeightFF::EvaluateWhenApplied(const ChartHypothesis &hypo, | |
| ScoreComponentCollection* accumulator) const | |
| { | |
| // TODO Throw exception. | |
| assert(false); | |
| } | |
| void InputWeightFF::EvaluateWhenApplied( | |
| const Syntax::SHyperedge &hyperedge, | |
| ScoreComponentCollection* accumulator) const | |
| { | |
| accumulator->PlusEquals(this, hyperedge.label.inputWeight); | |
| } | |
| void InputWeightFF::SetParameter(const std::string& key, | |
| const std::string& value) | |
| { | |
| StatelessFeatureFunction::SetParameter(key, value); | |
| } | |
| } // Syntax | |
| } // Moses | |