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:
authorHieu Hoang <fishandfrolick@gmail.com>2012-06-01 02:32:24 +0400
committerHieu Hoang <fishandfrolick@gmail.com>2012-06-01 02:32:24 +0400
commit417d5ee57ba980b4a88031550163a218bf9c5a1c (patch)
tree29662a0db328b4fc5fa3ece97cb5bbf931d79fee /biconcor/PhrasePairCollection.h
parent48faedb3bdfe1507d19cf2b76fbc81f3be2ff244 (diff)
move biconcor to /
Diffstat (limited to 'biconcor/PhrasePairCollection.h')
-rw-r--r--biconcor/PhrasePairCollection.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/biconcor/PhrasePairCollection.h b/biconcor/PhrasePairCollection.h
new file mode 100644
index 000000000..f88bfc10f
--- /dev/null
+++ b/biconcor/PhrasePairCollection.h
@@ -0,0 +1,46 @@
+#pragma once
+
+#include <vector>
+#include <string>
+
+class Alignment;
+class PhrasePair;
+class SuffixArray;
+class TargetCorpus;
+class Mismatch;
+
+class PhrasePairCollection
+{
+public:
+ typedef unsigned int INDEX;
+
+private:
+ SuffixArray *m_suffixArray;
+ TargetCorpus *m_targetCorpus;
+ Alignment *m_alignment;
+ std::vector<std::vector<PhrasePair*> > m_collection;
+ std::vector< Mismatch* > m_mismatch, m_unaligned;
+ int m_size;
+ int m_max_lookup;
+ int m_max_pp_target;
+ int m_max_pp;
+
+ // No copying allowed.
+ PhrasePairCollection(const PhrasePairCollection&);
+ void operator=(const PhrasePairCollection&);
+
+public:
+ PhrasePairCollection ( SuffixArray *, TargetCorpus *, Alignment * );
+ ~PhrasePairCollection ();
+
+ bool GetCollection( const std::vector<std::string >& sourceString );
+ void Print() const;
+ void PrintHTML() const;
+};
+
+// sorting helper
+struct CompareBySize {
+ bool operator()(const std::vector<PhrasePair*>& a, const std::vector<PhrasePair*>& b ) const {
+ return a.size() > b.size();
+ }
+};