Download tools/mosesdecoder/moses2/ManagerBase.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/moses2/ManagerBase.cpp
- Command line
-
hf download hf://Quagmire1/wiki-cased/tools/mosesdecoder/moses2/ManagerBase.cpp
-
curl -L -o ManagerBase.cpp https://huggingface.co/Quagmire1/wiki-cased/resolve/main/tools/mosesdecoder/moses2/ManagerBase.cpp
1.11 kB
| /* | |
| * Manager.cpp | |
| * | |
| * Created on: 23 Oct 2015 | |
| * Author: hieu | |
| */ | |
| using namespace std; | |
| namespace Moses2 | |
| { | |
| ManagerBase::ManagerBase(System &sys, const TranslationTask &task, | |
| const std::string &inputStr, long translationId) | |
| :system(sys) | |
| ,task(task) | |
| ,m_inputStr(inputStr) | |
| ,m_translationId(translationId) | |
| ,m_pool(NULL) | |
| ,m_systemPool(NULL) | |
| ,m_hypoRecycler(NULL) | |
| ,m_input(NULL) | |
| { | |
| } | |
| ManagerBase::~ManagerBase() | |
| { | |
| system.featureFunctions.CleanUpAfterSentenceProcessing(*m_input); | |
| GetPool().Reset(); | |
| GetHypoRecycler().Clear(); | |
| } | |
| void ManagerBase::InitPools() | |
| { | |
| m_pool = &system.GetManagerPool(); | |
| m_systemPool = &system.GetSystemPool(); | |
| m_hypoRecycler = &system.GetHypoRecycler(); | |
| //cerr << "pool size " << m_pool->Size() << " " << m_systemPool->Size() << endl; | |
| } | |
| } | |