https://github.com/wilkeraziz/mosesdecoder
Revision 8a2a99023aef8e7e0fe9763d728b998c5bc25711 authored by Ales Tamchyna on 03 January 2013, 12:39:15 UTC, committed by Ales Tamchyna on 03 January 2013, 12:39:15 UTC
1 parent e2cac60
Raw File
Tip revision: 8a2a99023aef8e7e0fe9763d728b998c5bc25711 authored by Ales Tamchyna on 03 January 2013, 12:39:15 UTC
in LocalLM, do not try to predict words without context (at least 1 word)
Tip revision: 8a2a990
Mismatch.h
#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 );
};
back to top