Moses::Range Class Reference

#include <Range.h>

List of all members.

Public Member Functions

 Range ()
 Range (size_t startPos, size_t endPos)
 Range (const Range &copy)
size_t GetStartPos () const
size_t GetEndPos () const
size_t GetNumWordsCovered () const
 count of words translated
bool operator< (const Range &x) const
 transitive comparison
bool operator== (const Range &x) const
bool Overlap (const Range &x) const
size_t GetNumWordsBetween (const Range &x) const
 TO_STRING ()

Friends

std::ostream & operator<< (std::ostream &out, const Range &range)


Detailed Description

Definition at line 41 of file Range.h.


Constructor & Destructor Documentation

Moses::Range::Range (  )  [inline, explicit]

Definition at line 48 of file Range.h.

Moses::Range::Range ( size_t  startPos,
size_t  endPos 
) [inline]

Definition at line 49 of file Range.h.

Moses::Range::Range ( const Range copy  )  [inline]

Definition at line 50 of file Range.h.


Member Function Documentation

size_t Moses::Range::GetEndPos (  )  const [inline]

Definition at line 58 of file Range.h.

Referenced by Moses::TranslationOptionCollection::Add(), Moses::DottedRuleColl::Add(), Moses::Syntax::S2T::PChart::AddVertex(), Moses::DistortionScoreProducer::CalculateDistortionScore(), Moses::SearchCubePruning::CheckDistortion(), Moses::WordLattice::ComputeDistortionDistance(), Moses::InputType::ComputeDistortionDistance(), Moses::NieceTerminal::ContainTerm(), Moses::SparseReordering::CopyScores(), Moses::ChartTranslationOptions::CreateSourceRuleFromInputPath(), Moses::Syntax::F2S::Manager< RuleMatcher >::Decode(), Moses::Syntax::S2T::Scope3Parser< Callback >::EnumerateHyperedges(), Moses::Syntax::S2T::RecursiveCYKPlusParser< Callback >::EnumerateHyperedges(), Moses::LanguageModelKen< Model >::EvaluateWhenApplied(), Moses::LanguageModelIRST::EvaluateWhenApplied(), Moses::LanguageModelImplementation::EvaluateWhenApplied(), Moses::LanguageModelDALM::EvaluateWhenApplied(), Moses::SparseHieroReorderingFeature::EvaluateWhenApplied(), Moses::OpSequenceModel::EvaluateWhenApplied(), Moses::DistortionScoreProducer::EvaluateWhenApplied(), Moses::ConstrainedDecoding::EvaluateWhenApplied(), Moses::SourceGHKMTreeInputMatchFeature::EvaluateWithSourceContext(), Moses::SoftSourceSyntacticConstraintsFeature::EvaluateWithSourceContext(), Moses::TranslationOptionCollectionLattice::Extend(), Moses::Syntax::S2T::PatternApplicationTrie::Extend(), Moses::ChartCellCollectionBase::GetBase(), Moses::Scope3Parser::GetChartRuleCollection(), Moses::ChartRuleLookupManagerOnDisk::GetChartRuleCollection(), Moses::ChartRuleLookupManagerMemoryPerSentence::GetChartRuleCollection(), Moses::ChartRuleLookupManagerMemory::GetChartRuleCollection(), Moses::TranslationOption::GetEndPos(), Moses::ChartParser::GetInputPath(), Moses::LRModel::GetOrientation(), Moses::TranslationOption::GetSize(), Moses::Hypothesis::GetSize(), Moses::Phrase::GetSubString(), Moses::PhraseDictionaryTreeAdaptor::GetTargetPhraseCollectionLEGACY(), Moses::TranslationOptionCollection::GetTranslationOptionList(), Moses::Sentence::GetXmlTranslationOptions(), Moses::LanguageModelChartState::hash(), Moses::DistortionState::hash(), Moses::hash_value(), Moses::Syntax::S2T::EagerParserCallback::InitForRange(), Moses::BackwardsEdge::Initialize(), Moses::InputType::IsCoveragePossible(), Moses::InputType::IsExtensionPossible(), Moses::IsMonotonicStep(), Moses::IsSwap(), Moses::ChartCellCollectionBase::MutableBase(), Moses::VWFeatureSourceWindow::operator()(), Moses::VWFeatureSourceSenseWindow::operator()(), Moses::VWFeatureSourcePhraseInternal::operator()(), Moses::VWFeatureSourceIndicator::operator()(), Moses::operator<<(), Moses::LanguageModelChartState::operator==(), Moses::DistortionState::operator==(), Moses::Manager::OutputNBest(), Moses::OutputSearchNode(), Moses::Manager::OutputSurface(), Moses::Bitmap::Overlap(), Moses::Syntax::S2T::PHyperedgeToSHyperedgeBundle(), Moses::Hypothesis::PrintHypothesis(), TranslationAnalysis::PrintTranslationAnalysis(), Moses::TreeInput::Read(), Moses::ReorderingStack::ShiftReduce(), Moses::PhraseOrientationFeature::SparseWordR2LScore(), Moses::TargetNgramChartState::TargetNgramChartState(), and Moses::TranslationOptionCollectionText::ViolatesXmlOptionsConstraint().

size_t Moses::Range::GetNumWordsBetween ( const Range x  )  const [inline]

Definition at line 85 of file Range.h.

References Overlap(), and UTIL_THROW_IF2.

Referenced by Moses::DistortionScoreProducer::CalculateDistortionScore().

Here is the call graph for this function:

Here is the caller graph for this function:

size_t Moses::Range::GetNumWordsCovered (  )  const [inline]

size_t Moses::Range::GetStartPos (  )  const [inline]

Definition at line 55 of file Range.h.

Referenced by Moses::TranslationOptionCollection::Add(), Moses::Syntax::S2T::PChart::AddVertex(), Moses::BackwardsEdge::BackwardsEdge(), Moses::DistortionScoreProducer::CalculateDistortionScore(), Moses::SearchCubePruning::CheckDistortion(), Moses::WordLattice::ComputeDistortionDistance(), Moses::InputType::ComputeDistortionDistance(), Moses::NieceTerminal::ContainTerm(), Moses::SparseReordering::CopyScores(), Moses::ChartParser::Create(), Moses::ChartTranslationOptions::CreateSourceRuleFromInputPath(), Moses::TranslationOptionCollectionLattice::CreateTranslationOptions(), Moses::Syntax::F2S::Manager< RuleMatcher >::Decode(), Moses::Syntax::T2S::RuleMatcherSCFG< Callback >::EnumerateHyperedges(), Moses::Syntax::S2T::Scope3Parser< Callback >::EnumerateHyperedges(), Moses::Syntax::S2T::RecursiveCYKPlusParser< Callback >::EnumerateHyperedges(), Moses::LanguageModelKen< Model >::EvaluateWhenApplied(), Moses::LanguageModelIRST::EvaluateWhenApplied(), Moses::LanguageModelImplementation::EvaluateWhenApplied(), Moses::LanguageModelDALM::EvaluateWhenApplied(), Moses::SparseHieroReorderingFeature::EvaluateWhenApplied(), Moses::OpSequenceModel::EvaluateWhenApplied(), Moses::DesegModel::EvaluateWhenApplied(), Moses::DistortionScoreProducer::EvaluateWhenApplied(), Moses::ConstrainedDecoding::EvaluateWhenApplied(), Moses::WordTranslationFeature::EvaluateWithSourceContext(), Moses::SourceGHKMTreeInputMatchFeature::EvaluateWithSourceContext(), Moses::SoftSourceSyntacticConstraintsFeature::EvaluateWithSourceContext(), Moses::TranslationOptionCollectionLattice::Extend(), Moses::Syntax::S2T::PatternApplicationTrie::Extend(), Moses::ChartCellCollectionBase::GetBase(), Moses::Scope3Parser::GetChartRuleCollection(), Moses::ChartRuleLookupManagerOnDisk::GetChartRuleCollection(), Moses::ChartRuleLookupManagerMemoryPerSentence::GetChartRuleCollection(), Moses::ChartRuleLookupManagerMemory::GetChartRuleCollection(), Moses::ChartRuleLookupManagerExample::GetChartRuleCollection(), Moses::GetContext(), Moses::ChartParser::GetInputPath(), Moses::LRModel::GetOrientation(), Moses::TranslationOption::GetSize(), Moses::TranslationOption::GetStartPos(), Moses::Phrase::GetSubString(), Moses::PhraseDictionaryTreeAdaptor::GetTargetPhraseCollectionLEGACY(), Moses::TranslationOptionCollection::GetTranslationOptionList(), Moses::Hypothesis::GetWord(), Moses::Sentence::GetXmlTranslationOptions(), Moses::LanguageModelChartState::hash(), Moses::hash_value(), Moses::Syntax::S2T::EagerParserCallback::InitForRange(), Moses::BackwardsEdge::Initialize(), Moses::InputType::IsCoveragePossible(), Moses::InputType::IsExtensionPossible(), Moses::IsMonotonicStep(), Moses::IsSwap(), Moses::ChartCellCollectionBase::MutableBase(), Moses::VWFeatureSourceWindow::operator()(), Moses::VWFeatureSourceSenseWindow::operator()(), Moses::VWFeatureSourcePhraseInternal::operator()(), Moses::VWFeatureSourceIndicator::operator()(), Moses::operator<<(), Moses::LanguageModelChartState::operator==(), Moses::Manager::OutputAlignment(), Moses::Hypothesis::OutputAlignment(), Moses::Manager::OutputInput(), Moses::Hypothesis::OutputInput(), Moses::Manager::OutputNBest(), Moses::OutputSearchNode(), Moses::Manager::OutputSurface(), Moses::Bitmap::Overlap(), Moses::Syntax::S2T::PHyperedgeToSHyperedgeBundle(), Moses::Hypothesis::PrintHypothesis(), TranslationAnalysis::PrintTranslationAnalysis(), Moses::SearchNormal::ProcessOneHypothesis(), Moses::TreeInput::Read(), Moses::ReorderingStack::ShiftReduce(), Moses::PhraseOrientationFeature::SparseWordL2RScore(), Moses::TargetNgramChartState::TargetNgramChartState(), and Moses::TranslationOptionCollectionText::ViolatesXmlOptionsConstraint().

bool Moses::Range::operator< ( const Range x  )  const [inline]

transitive comparison

Definition at line 68 of file Range.h.

bool Moses::Range::operator== ( const Range x  )  const [inline]

Definition at line 74 of file Range.h.

bool Moses::Range::Overlap ( const Range x  )  const [inline]

Definition at line 78 of file Range.h.

Referenced by GetNumWordsBetween().

Here is the caller graph for this function:

Moses::Range::TO_STRING (  ) 


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const Range range 
) [friend]

Definition at line 27 of file Range.cpp.


The documentation for this class was generated from the following file:

Generated on Thu Jul 6 00:33:30 2017 for Moses by  doxygen 1.5.9