00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #pragma once
00021 #ifndef EXTRACTEDRULE_H_INCLUDED_
00022 #define EXTRACTEDRULE_H_INCLUDED_
00023
00024 #include <string>
00025 #include <iostream>
00026 #include <sstream>
00027 #include <map>
00028
00029 #include "PhraseOrientation.h"
00030
00031 namespace MosesTraining
00032 {
00033
00034
00035 class ExtractedRule
00036 {
00037 public:
00038 std::string source;
00039 std::string target;
00040 std::string alignment;
00041 std::string alignmentInv;
00042 std::string sourceContextLeft;
00043 std::string sourceContextRight;
00044 std::string targetContextLeft;
00045 std::string targetContextRight;
00046 std::string sourceHoleString;
00047 std::string targetHoleString;
00048 std::string targetSyntacticPreference;
00049 int startT;
00050 int endT;
00051 int startS;
00052 int endS;
00053 float count;
00054 double pcfgScore;
00055 PhraseOrientation::REO_CLASS l2rOrientation;
00056 PhraseOrientation::REO_CLASS r2lOrientation;
00057
00058 ExtractedRule(int sT, int eT, int sS, int eS)
00059 : source()
00060 , target()
00061 , alignment()
00062 , alignmentInv()
00063 , sourceContextLeft()
00064 , sourceContextRight()
00065 , targetContextLeft()
00066 , targetContextRight()
00067 , sourceHoleString()
00068 , targetHoleString()
00069 , targetSyntacticPreference()
00070 , startT(sT)
00071 , endT(eT)
00072 , startS(sS)
00073 , endS(eS)
00074 , count(0)
00075 , pcfgScore(0.0)
00076 , l2rOrientation(PhraseOrientation::REO_CLASS_UNKNOWN)
00077 , r2lOrientation(PhraseOrientation::REO_CLASS_UNKNOWN)
00078 { }
00079 };
00080
00081 }
00082
00083 #endif