Download tools/mosesdecoder/moses/Syntax/S2T/PChart.cpp from Quagmire1/wiki-cased: direct link, hf CLI and curl.
- Browser
- Download file 677 Bytes
-
https://huggingface.co/Quagmire1/wiki-cased/resolve/main/tools/mosesdecoder/moses/Syntax/S2T/PChart.cpp
- Command line
-
hf download hf://Quagmire1/wiki-cased/tools/mosesdecoder/moses/Syntax/S2T/PChart.cpp
-
curl -L -o PChart.cpp https://huggingface.co/Quagmire1/wiki-cased/resolve/main/tools/mosesdecoder/moses/Syntax/S2T/PChart.cpp
677 Bytes
| namespace Moses | |
| { | |
| namespace Syntax | |
| { | |
| namespace S2T | |
| { | |
| PChart::PChart(std::size_t width, bool maintainCompressedChart) | |
| { | |
| m_cells.resize(width); | |
| for (std::size_t i = 0; i < width; ++i) { | |
| m_cells[i].resize(width); | |
| } | |
| if (maintainCompressedChart) { | |
| m_compressedChart = new CompressedChart(width); | |
| for (CompressedChart::iterator p = m_compressedChart->begin(); | |
| p != m_compressedChart->end(); ++p) { | |
| p->resize(FactorCollection::Instance().GetNumNonTerminals()); | |
| } | |
| } | |
| } | |
| PChart::~PChart() | |
| { | |
| delete m_compressedChart; | |
| } | |
| } // namespace S2T | |
| } // namespace Syntax | |
| } // namespace Moses | |