diff options
author | Hieu Hoang <fishandfrolick@gmail.com> | 2012-06-01 02:32:24 +0400 |
---|---|---|
committer | Hieu Hoang <fishandfrolick@gmail.com> | 2012-06-01 02:32:24 +0400 |
commit | 417d5ee57ba980b4a88031550163a218bf9c5a1c (patch) | |
tree | 29662a0db328b4fc5fa3ece97cb5bbf931d79fee /biconcor/Mismatch.h | |
parent | 48faedb3bdfe1507d19cf2b76fbc81f3be2ff244 (diff) |
move biconcor to /
Diffstat (limited to 'biconcor/Mismatch.h')
-rw-r--r-- | biconcor/Mismatch.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/biconcor/Mismatch.h b/biconcor/Mismatch.h new file mode 100644 index 000000000..c0063d049 --- /dev/null +++ b/biconcor/Mismatch.h @@ -0,0 +1,40 @@ +#pragma once + +#include <iosfwd> + +class Alignment; +class SuffixArray; +class TargetCorpus; + +class Mismatch +{ +public: + typedef unsigned int INDEX; + +private: + SuffixArray *m_suffixArray; + TargetCorpus *m_targetCorpus; + Alignment *m_alignment; + INDEX m_sentence_id; + INDEX m_num_alignment_points; + int m_source_length; + int m_target_length; + INDEX m_source_position; + int m_source_start; + int m_source_end; + bool m_source_unaligned[ 256 ]; + bool m_target_unaligned[ 256 ]; + bool m_unaligned; + + // No copying allowed. + Mismatch(const Mismatch&); + void operator=(const Mismatch&); + +public: + Mismatch( SuffixArray *sa, TargetCorpus *tc, Alignment *a, INDEX sentence_id, INDEX position, int source_length, int target_length, int source_start, int source_end ); + ~Mismatch(); + + bool Unaligned() const { return m_unaligned; } + void PrintClippedHTML(std::ostream* out, int width ); + void LabelSourceMatches(int *source_annotation, int *target_annotation, int source_id, int label ); +}; |