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

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Germann <Ulrich.Germann@gmail.com>2015-11-23 19:57:35 +0300
committerUlrich Germann <Ulrich.Germann@gmail.com>2015-11-23 19:57:35 +0300
commit9a7356bbed19062ff51b794c269e811328bb9feb (patch)
treeea38d6ddb06465b9647bd2c970488c7e4b8cc23b
parent87ec9f56c74d16e911dbaa3274f9957f244a61f2 (diff)
Adaptation to renamed functions in Bitext class.
-rw-r--r--moses/TranslationModel/UG/bitext-find.cc26
1 files changed, 13 insertions, 13 deletions
diff --git a/moses/TranslationModel/UG/bitext-find.cc b/moses/TranslationModel/UG/bitext-find.cc
index d02ce0710..4c6e13208 100644
--- a/moses/TranslationModel/UG/bitext-find.cc
+++ b/moses/TranslationModel/UG/bitext-find.cc
@@ -53,16 +53,16 @@ int main(int argc, char* argv[])
interpret_args(argc, argv);
if (Q1.empty() && Q2.empty()) exit(0);
- mmbitext B; string w;
- B.open(bname, L1, L2);
+ boost::shared_ptr<mmbitext> B(new mmbitext); string w;
+ B->open(bname, L1, L2);
- Bitext<Token>::iter m1(B.I1.get(), *B.V1, Q1);
+ Bitext<Token>::iter m1(B->I1.get(), *B->V1, Q1);
if (Q1.size() && m1.size() == 0) exit(0);
- Bitext<Token>::iter m2(B.I2.get(), *B.V2, Q2);
+ Bitext<Token>::iter m2(B->I2.get(), *B->V2, Q2);
if (Q2.size() && m2.size() == 0) exit(0);
- bitvector check(B.T1->size());
+ bitvector check(B->T1->size());
if (Q1.size() == 0 || Q2.size() == 0) check.set();
else (m2.markSentences(check));
@@ -87,23 +87,23 @@ int main(int argc, char* argv[])
size_t s1,s2,e1,e2; int po_fwd=-1,po_bwd=-1;
std::vector<unsigned char> caln;
- // cout << sid << " " << B.docname(sid) << std::endl;
- if (!B.find_trg_phr_bounds(sid, off, off+m.size(),
+ // cout << sid << " " << B->docname(sid) << std::endl;
+ if (!B->find_trg_phr_bounds(sid, off, off+m.size(),
s1,s2,e1,e2,po_fwd,po_bwd,
&caln, NULL, &m == &m2))
{
// cout << "alignment failure" << std::endl;
}
- std::cout << sid << " " << B.docname(sid)
+ std::cout << sid << " " << B->sid2docname(sid)
<< " dfwd=" << po_fwd << " dbwd=" << po_bwd
<< "\n";
- write_sentence(*B.T1, sid, *B.V1, std::cout); std::cout << "\n";
- write_sentence(*B.T2, sid, *B.V2, std::cout); std::cout << "\n";
- B.write_yawat_alignment(sid,
- m1.size() ? &m1 : NULL,
- m2.size() ? &m2 : NULL, std::cout);
+ write_sentence(*B->T1, sid, *B->V1, std::cout); std::cout << "\n";
+ write_sentence(*B->T2, sid, *B->V2, std::cout); std::cout << "\n";
+ B->write_yawat_alignment(sid,
+ m1.size() ? &m1 : NULL,
+ m2.size() ? &m2 : NULL, std::cout);
std::cout << std::endl;
}