peacock-data-public-datasets-idc-temp-code
/
cc-multilingual-main
/cc_net
/third_party
/kenlm
/lm
/common
/renumber.cc
namespace lm { | |
void Renumber::Run(const util::stream::ChainPosition &position) { | |
for (util::stream::Stream stream(position); stream; ++stream) { | |
NGramHeader gram(stream.Get(), order_); | |
for (WordIndex *w = gram.begin(); w != gram.end(); ++w) { | |
*w = new_numbers_[*w]; | |
} | |
} | |
} | |
} // namespace lm | |