mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-26 05:14:36 +03:00
33 lines
519 B
C++
33 lines
519 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
|
|
#if defined(__GLIBCXX__) || defined(__GLIBCPP__)
|
|
|
|
namespace MosesTuning
|
|
{
|
|
|
|
|
|
class ofdstream;
|
|
class ifdstream;
|
|
|
|
/*
|
|
* This class runs the filter command in a child process and
|
|
* then use this filter to process given sentences.
|
|
*/
|
|
class PreProcessFilter
|
|
{
|
|
public:
|
|
explicit PreProcessFilter(const std::string& filterCommand);
|
|
std::string ProcessSentence(const std::string& sentence);
|
|
~PreProcessFilter();
|
|
|
|
private:
|
|
ofdstream* m_toFilter;
|
|
ifdstream* m_fromFilter;
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|