00001
00002 #pragma once
00003 #include "ug_typedefs.h"
00004 #include <stdint.h>
00005 #include <vector>
00006
00007 #ifndef NO_MOSES
00008 #include "moses/FF/LexicalReordering/LRState.h"
00009 #endif
00010
00011 namespace sapt {
00012
00013 #ifdef NO_MOSES
00014 class LRModel{
00015 public:
00016 enum ModelType { Monotonic, MSD, MSLR, LeftRight, None };
00017 enum Direction { Forward, Backward, Bidirectional };
00018
00019 enum ReorderingType {
00020 M = 0,
00021 NM = 1,
00022 S = 1,
00023 D = 2,
00024 DL = 2,
00025 DR = 3,
00026 R = 0,
00027 L = 1,
00028 MAX = 3,
00029 NONE = 4
00030 };
00031
00032 };
00033 typedef int PhraseOrientation;
00034 #else
00035 typedef Moses::LRModel LRModel;
00036 typedef Moses::LRModel::ReorderingType PhraseOrientation;
00037 #endif
00038
00039 PhraseOrientation
00040 find_po_fwd(std::vector<std::vector<ushort> >& a1,
00041 std::vector<std::vector<ushort> >& a2,
00042 size_t b1, size_t e1,
00043 size_t b2, size_t e2);
00044
00045 PhraseOrientation
00046 find_po_bwd(std::vector<std::vector<ushort> >& a1,
00047 std::vector<std::vector<ushort> >& a2,
00048 size_t b1, size_t e1,
00049 size_t b2, size_t e2);
00050
00051 }