Repository navigation
Expand file tree
/
Copy pathExtractPair.h
More file actions
188 lines (170 loc) · 6.09 KB
/
Copy pathExtractPair.h
File metadata and controls
188 lines (170 loc) · 6.09 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
#ifndef EXtract_H
#define EXtract_H
#include "ComTypes.h"
#include "Disk.h"
#include <stdlib.h>
#include <string>
#include <stdio.h>
#include <algorithm>
#include <vector>
#include <iostream>
using namespace std;
void initAlignment(ref_set_t *refset,
disk_handler_t *handler,
uint *devicemem);
lexicalFileCuda* initWordPossibilityIntKey(disk_handler_t *handler,
ref_set_t* refset);
std::map<std::string, categ> initWordPossibility(disk_handler_t *handler,
hashtbl* refstrid,
hashtbl* targetstrid);
void ExtractPairs(void *handler,
ref_set_t *refset,
qry_set_t *qryset,
timing_t *timing,
std::map<std::string, categ> worder);
void extractPairFinalize(void *handler);
red_dup_t* createLexicon( int count,
res_phrase_t* out_res,
int* source_str,
int* target_str,
hashtbl_aux** lexic,
hash_lexicon** target_count,
hash_lexicon** foreig_count,
int* lexicon_index,
saind_t * tmp_blocks,
map<string, categ> word_score,
vector<char*> sourceName,
int global,
red_dup_t* fast_speed,
char** target_vocabulary);
red_dup_t* createLexiconGappy(
int* source_str,
int* target_str,
int* lexicon_index,
saind_t * tmp_blocks,//gapSearch for continous phrases
map<string, categ> word_score,
vector<char*> sourceName,
int global,
rule_onegap* oneGapRule,
rule_twogap* twoGapRule,
unsigned int count_one_gap,//Total number of one gap results
unsigned int count_two_gap,//Total number of two gap results
int seperatorOneGap,//Seperator between aXb; Xab, abX
int seperatorTwoGap_one,//XabX;aXbXc
int seperatorTwoGap_two,//aXbXc;XaXb,aXbX
unsigned int distinctOneGapCount,//Distinct pattern count
unsigned int distinctTwoGapCount,//pattern count - gappy ID max
gapPattern* onegapPattern,//source side pattern
gapPattern2* twogapPattern,
char** target_vocabulary,
char** source_vocabulary,
red_dup_t* fast_speed,
gappy_search* oneGapSearch,
two_gappy_search* twoGapSearch);
red_dup_t* createLexiconTwoGap(
int* source_str,
int* target_str,
int* lexicon_index,
saind_t * tmp_blocks,//gapSearch for continous phrases
map<string, categ> word_score,
vector<char*> sourceName,
int global,
rule_onegap* oneGapRule,
rule_twogap* twoGapRule,
unsigned int count_one_gap,//Total number of one gap results
unsigned int count_two_gap,//Total number of two gap results
int seperatorOneGap,//Seperator between aXb; Xab, abX
int seperatorTwoGap_one,//XabX;aXbXc
int seperatorTwoGap_two,//aXbXc;XaXb,aXbX
unsigned int distinctOneGapCount,//Distinct pattern count
unsigned int distinctTwoGapCount,//pattern count - gappy ID max
gapPattern* onegapPattern,//source side pattern
gapPattern2* twogapPattern,
char** target_vocabulary,
char** source_vocabulary,
red_dup_t* fast_speed,
gappy_search* oneGapSearch,
two_gappy_search* twoGapSearch);
red_dup_t* createLexiconFast( int count,
res_phrase_t* out_res,
int* source_str,
int* target_str,
hashtbl_aux** lexic,
hash_lexicon** target_count,
hash_lexicon** foreig_count,
int* lexicon_index,
saind_t * tmp_blocks,
lexicalTask* maxEF,
vector<char*> sourceName,
int global,
red_dup_t* fast_speed,
char** target_vocabulary,
unsigned int* lexicalTaskCounter);
red_dup_t* createLexiconGappyFast(
int* source_str,
int* target_str,
int* lexicon_index,
saind_t * tmp_blocks,//gapSearch for continous phrases
lexicalTask* maxEF,
vector<char*> sourceName,
int global,
rule_onegap* oneGapRule,
rule_twogap* twoGapRule,
unsigned int count_one_gap,//Total number of one gap results
unsigned int count_two_gap,//Total number of two gap results
int seperatorOneGap,//Seperator between aXb; Xab, abX
int seperatorTwoGap_one,//XabX;aXbXc
int seperatorTwoGap_two,//aXbXc;XaXb,aXbX
unsigned int distinctOneGapCount,//Distinct pattern count
unsigned int distinctTwoGapCount,//pattern count - gappy ID max
gapPattern* onegapPattern,//source side pattern
gapPattern2* twogapPattern,
char** target_vocabulary,
char** source_vocabulary,
red_dup_t* fast_speed,
gappy_search* oneGapSearch,
two_gappy_search* twoGapSearch,
unsigned int* lexicalTaskCounter,
oneGapOnSA* oneGapSA,
ref_t* refSource);
red_dup_t* createLexiconTwoGapFast(
int* source_str,
int* target_str,
int* lexicon_index,
saind_t * tmp_blocks,//gapSearch for continous phrases
lexicalTask* maxEF,
vector<char*> sourceName,
int global,
rule_onegap* oneGapRule,
rule_twogap* twoGapRule,
unsigned int count_one_gap,//Total number of one gap results
unsigned int count_two_gap,//Total number of two gap results
int seperatorOneGap,//Seperator between aXb; Xab, abX
int seperatorTwoGap_one,//XabX;aXbXc
int seperatorTwoGap_two,//aXbXc;XaXb,aXbX
unsigned int distinctOneGapCount,//Distinct pattern count
unsigned int distinctTwoGapCount,//pattern count - gappy ID max
gapPattern* onegapPattern,//source side pattern
gapPattern2* twogapPattern,
char** target_vocabulary,
char** source_vocabulary,
red_dup_t* fast_speed,
gappy_search* oneGapSearch,
two_gappy_search* twoGapSearch,
unsigned int* lexicalTaskCounter,
oneGapOnSA* oneGapSA,
ref_t* refSource);
void ExtractPairs_Large_Data(void *handler,
ref_set_t *refset,
qry_set_t *qryset,
timing_t *timing,
std::map<std::string, categ> worder,
disk_handler_t *diskInfo);
void ExtractPairs_Large_Data_Gappy(void *handler,
ref_set_t *refset,
qry_set_t *qryset,
timing_t *timing,
lexicalFileCuda* cudaLexFile,//already cuda memory allocated
//std::map<std::string, categ> worder,
disk_handler_t *diskInfo);
#endif /* EXtract_H END */