mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-27 14:05:29 +03:00
32 lines
557 B
C++
32 lines
557 B
C++
#ifndef MERT_PREPROCESSFILTER_H_
|
|
#define MERT_PREPROCESSFILTER_H_
|
|
|
|
#include <string>
|
|
|
|
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 // MERT_PREPROCESSFILTER_H_
|