Download tools/mosesdecoder/moses/FF/LexicalReordering/BidirectionalReorderingState.cpp from Quagmire1/wiki-cased: direct link, hf CLI and curl.
- Browser
- Download file 944 Bytes
-
https://huggingface.co/Quagmire1/wiki-cased/resolve/main/tools/mosesdecoder/moses/FF/LexicalReordering/BidirectionalReorderingState.cpp
- Command line
-
hf download hf://Quagmire1/wiki-cased/tools/mosesdecoder/moses/FF/LexicalReordering/BidirectionalReorderingState.cpp
-
curl -L -o BidirectionalReorderingState.cpp https://huggingface.co/Quagmire1/wiki-cased/resolve/main/tools/mosesdecoder/moses/FF/LexicalReordering/BidirectionalReorderingState.cpp
944 Bytes
| namespace Moses | |
| { | |
| /////////////////////////// | |
| //BidirectionalReorderingState | |
| size_t BidirectionalReorderingState::hash() const | |
| { | |
| size_t ret = m_backward->hash(); | |
| boost::hash_combine(ret, m_forward->hash()); | |
| return ret; | |
| } | |
| bool BidirectionalReorderingState::operator==(const FFState& o) const | |
| { | |
| if (&o == this) return true; | |
| BidirectionalReorderingState const &other | |
| = static_cast<BidirectionalReorderingState const&>(o); | |
| bool ret = (*m_backward == *other.m_backward) && (*m_forward == *other.m_forward); | |
| return ret; | |
| } | |
| LRState* | |
| BidirectionalReorderingState:: | |
| Expand(const TranslationOption& topt, const InputType& input, | |
| ScoreComponentCollection* scores) const | |
| { | |
| LRState *newbwd = m_backward->Expand(topt,input, scores); | |
| LRState *newfwd = m_forward->Expand(topt, input, scores); | |
| return new BidirectionalReorderingState(m_configuration, newbwd, newfwd, m_offset); | |
| } | |
| } | |