Welcome to mirror list, hosted at ThFree Co, Russian Federation.

PreProcessFilter.h « mert - github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 27c8d35ff7a564efec8dc695502c4a3dd809b687 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifndef MERT_PREPROCESSFILTER_H_
#define MERT_PREPROCESSFILTER_H_

#include <string>

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_