Moses::InternalTree Class Reference

#include <InternalTree.h>

Collaboration diagram for Moses::InternalTree:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 InternalTree (const std::string &line, size_t start, size_t len, const bool terminal)
 InternalTree (const std::string &line, const bool nonterminal=true)
 InternalTree (const InternalTree &tree)
size_t AddSubTree (const std::string &line, size_t start)
std::string GetString (bool start=true) const
void Combine (const std::vector< TreePointer > &previous)
void Unbinarize ()
void GetUnbinarizedChildren (std::vector< TreePointer > &children) const
const WordGetLabel () const
size_t GetLength () const
std::vector< TreePointer > & GetChildren ()
bool IsTerminal () const
bool IsLeafNT () const
bool FlatSearch (const Word &label, std::vector< TreePointer >::const_iterator &it) const
bool RecursiveSearch (const Word &label, std::vector< TreePointer >::const_iterator &it) const
bool RecursiveSearch (const Word &label, std::vector< TreePointer >::const_iterator &it, InternalTree const *&parent) const
 $generator (leafNT)
 $generator (leafNTParent)
 $generator (leafNTPath)


Detailed Description

Definition at line 22 of file InternalTree.h.


Constructor & Destructor Documentation

Moses::InternalTree::InternalTree ( const std::string &  line,
size_t  start,
size_t  len,
const bool  terminal 
)

Definition at line 7 of file InternalTree.cpp.

References Moses::Word::CreateFromString(), Moses::StaticData::Instance(), Moses::StaticData::options(), and Moses::Output.

Here is the call graph for this function:

Moses::InternalTree::InternalTree ( const std::string &  line,
const bool  nonterminal = true 
)

Definition at line 18 of file InternalTree.cpp.

References AddSubTree(), Moses::Word::CreateFromString(), Moses::StaticData::Instance(), and Moses::Output.

Here is the call graph for this function:

Moses::InternalTree::InternalTree ( const InternalTree tree  )  [inline]

Definition at line 29 of file InternalTree.h.


Member Function Documentation

Moses::InternalTree::$generator ( leafNTPath   )  [inline]

Definition at line 109 of file InternalTree.h.

References GetChildren(), and NULL.

Here is the call graph for this function:

Moses::InternalTree::$generator ( leafNTParent   )  [inline]

Definition at line 91 of file InternalTree.h.

References GetChildren().

Here is the call graph for this function:

Moses::InternalTree::$generator ( leafNT   )  [inline]

Definition at line 72 of file InternalTree.h.

References GetChildren().

Here is the call graph for this function:

size_t Moses::InternalTree::AddSubTree ( const std::string &  line,
size_t  start 
)

Definition at line 32 of file InternalTree.cpp.

References Moses::Word::CreateFromString(), Moses::StaticData::Instance(), and Moses::Output.

Referenced by InternalTree().

Here is the call graph for this function:

Here is the caller graph for this function:

void Moses::InternalTree::Combine ( const std::vector< TreePointer > &  previous  ) 

Definition at line 106 of file InternalTree.cpp.

bool Moses::InternalTree::FlatSearch ( const Word label,
std::vector< TreePointer >::const_iterator &  it 
) const

Definition at line 160 of file InternalTree.cpp.

std::vector<TreePointer>& Moses::InternalTree::GetChildren (  )  [inline]

const Word& Moses::InternalTree::GetLabel (  )  const [inline]

Definition at line 42 of file InternalTree.h.

Referenced by Moses::RDLM::GetChildHeadsAndLabels(), Moses::RDLM::GetHead(), and Moses::RDLM::Score().

Here is the caller graph for this function:

size_t Moses::InternalTree::GetLength (  )  const [inline]

Definition at line 46 of file InternalTree.h.

Referenced by Moses::RDLM::GetChildHeadsAndLabels(), Moses::RDLM::GetHead(), and Moses::RDLM::Score().

Here is the caller graph for this function:

std::string Moses::InternalTree::GetString ( bool  start = true  )  const

Definition at line 81 of file InternalTree.cpp.

References Moses::Word::GetString(), Moses::StaticData::Instance(), and IsTerminal().

Here is the call graph for this function:

void Moses::InternalTree::GetUnbinarizedChildren ( std::vector< TreePointer > &  children  )  const

Definition at line 148 of file InternalTree.cpp.

References StringPiece::as_string(), and StringPiece::empty().

Referenced by Unbinarize().

Here is the call graph for this function:

Here is the caller graph for this function:

bool Moses::InternalTree::IsLeafNT (  )  const [inline]

Definition at line 57 of file InternalTree.h.

References Moses::Word::IsNonTerminal().

Referenced by Moses::RDLM::Score().

Here is the call graph for this function:

Here is the caller graph for this function:

bool Moses::InternalTree::IsTerminal (  )  const [inline]

Definition at line 53 of file InternalTree.h.

References Moses::Word::IsNonTerminal().

Referenced by GetString(), and Moses::RDLM::Score().

Here is the call graph for this function:

Here is the caller graph for this function:

bool Moses::InternalTree::RecursiveSearch ( const Word label,
std::vector< TreePointer >::const_iterator &  it,
InternalTree const *&  parent 
) const

Definition at line 185 of file InternalTree.cpp.

bool Moses::InternalTree::RecursiveSearch ( const Word label,
std::vector< TreePointer >::const_iterator &  it 
) const

Definition at line 170 of file InternalTree.cpp.

void Moses::InternalTree::Unbinarize (  ) 

Definition at line 123 of file InternalTree.cpp.

References Moses::Word::GetString(), and GetUnbinarizedChildren().

Here is the call graph for this function:


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

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