00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #pragma once
00021 #ifndef SENTENCE_ALIGNMENT_H_INCLUDED_
00022 #define SENTENCE_ALIGNMENT_H_INCLUDED_
00023
00024 #include <string>
00025 #include <vector>
00026
00027 namespace MosesTraining
00028 {
00029
00030 class SentenceAlignment
00031 {
00032 public:
00033 std::vector<std::string> target;
00034 std::vector<std::string> source;
00035 std::vector<int> alignedCountS;
00036 std::vector<std::vector<int> > alignedToT, alignedToS;
00037 int sentenceID;
00038 std::string weightString;
00039
00040 virtual ~SentenceAlignment();
00041
00042 virtual bool processTargetSentence(const char *, int, bool boundaryRules);
00043
00044 virtual bool processSourceSentence(const char *, int, bool boundaryRules);
00045
00046 bool create(const char targetString[],
00047 const char sourceString[],
00048 const char alignmentString[],
00049 const char weightString[],
00050 int sentenceID, bool boundaryRules);
00051
00052 void invertAlignment();
00053
00054 };
00055
00056 }
00057
00058
00059 #endif