MosesTraining::SyntaxTree Class Reference

#include <SyntaxTree.h>

Collaboration diagram for MosesTraining::SyntaxTree:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 SyntaxTree ()
 ~SyntaxTree ()
SyntaxNodeAddNode (int startPos, int endPos, std::string label)
SyntaxNodeGetTop ()
ParentNodes Parse ()
bool HasNode (int startPos, int endPos) const
const std::vector< SyntaxNode * > & GetNodes (int startPos, int endPos) const
const std::vector< SyntaxNode * > & GetAllNodes ()
size_t GetNumWords () const
void ConnectNodes ()
void Clear ()
std::string ToString () const

Protected Types

typedef std::map< int,
std::vector< SyntaxNode * > > 
SyntaxTreeIndex2
typedef
SyntaxTreeIndex2::const_iterator 
SyntaxTreeIndexIterator2
typedef std::map< int,
SyntaxTreeIndex2
SyntaxTreeIndex
typedef
SyntaxTreeIndex::const_iterator 
SyntaxTreeIndexIterator

Protected Attributes

std::vector< SyntaxNode * > m_nodes
SyntaxNodem_top
SyntaxTreeIndex m_index
int m_size
std::vector< SyntaxNode * > m_emptyNode

Friends

std::ostream & operator<< (std::ostream &, const SyntaxTree &)


Detailed Description

Definition at line 82 of file SyntaxTree.h.


Member Typedef Documentation

typedef std::map< int, SyntaxTreeIndex2 > MosesTraining::SyntaxTree::SyntaxTreeIndex [protected]

Definition at line 90 of file SyntaxTree.h.

typedef std::map< int, std::vector< SyntaxNode* > > MosesTraining::SyntaxTree::SyntaxTreeIndex2 [protected]

Definition at line 88 of file SyntaxTree.h.

typedef SyntaxTreeIndex::const_iterator MosesTraining::SyntaxTree::SyntaxTreeIndexIterator [protected]

Definition at line 91 of file SyntaxTree.h.

typedef SyntaxTreeIndex2::const_iterator MosesTraining::SyntaxTree::SyntaxTreeIndexIterator2 [protected]

Definition at line 89 of file SyntaxTree.h.


Constructor & Destructor Documentation

MosesTraining::SyntaxTree::SyntaxTree (  )  [inline]

Definition at line 99 of file SyntaxTree.h.

References m_top.

MosesTraining::SyntaxTree::~SyntaxTree (  ) 

Definition at line 32 of file SyntaxTree.cpp.

References Clear().

Here is the call graph for this function:


Member Function Documentation

SyntaxNode * MosesTraining::SyntaxTree::AddNode ( int  startPos,
int  endPos,
std::string  label 
)

Definition at line 48 of file SyntaxTree.cpp.

References m_index, m_nodes, and m_size.

Referenced by LeftBinarize(), MosesTraining::ProcessAndStripXMLTags(), RightBinarize(), and SAMT().

Here is the caller graph for this function:

void MosesTraining::SyntaxTree::Clear (  ) 

Definition at line 37 of file SyntaxTree.cpp.

References m_index, m_nodes, and m_top.

Referenced by Moses::PCFG::XmlTreeParser::Parse(), Moses::GHKM::XmlTreeParser::Parse(), and ~SyntaxTree().

Here is the caller graph for this function:

void MosesTraining::SyntaxTree::ConnectNodes (  ) 

const std::vector< SyntaxNode* >& MosesTraining::SyntaxTree::GetAllNodes (  )  [inline]

Definition at line 113 of file SyntaxTree.h.

References m_nodes.

Referenced by SAMT(), and store().

Here is the caller graph for this function:

const std::vector< SyntaxNode * > & MosesTraining::SyntaxTree::GetNodes ( int  startPos,
int  endPos 
) const

Definition at line 102 of file SyntaxTree.cpp.

References m_emptyNode, and m_index.

Referenced by collectWordLabelCounts(), HasNode(), LeftBinarize(), MosesTraining::operator<<(), MosesTraining::ProcessAndStripXMLTags(), RightBinarize(), and SAMT().

Here is the caller graph for this function:

size_t MosesTraining::SyntaxTree::GetNumWords (  )  const [inline]

Definition at line 116 of file SyntaxTree.h.

References m_size.

Referenced by SAMT().

Here is the caller graph for this function:

SyntaxNode* MosesTraining::SyntaxTree::GetTop (  )  [inline]

Definition at line 106 of file SyntaxTree.h.

References m_top.

Referenced by Moses::PCFG::XmlTreeParser::Parse(), and Moses::GHKM::XmlTreeParser::Parse().

Here is the caller graph for this function:

bool MosesTraining::SyntaxTree::HasNode ( int  startPos,
int  endPos 
) const

Definition at line 97 of file SyntaxTree.cpp.

References GetNodes().

Referenced by MosesTraining::operator<<(), Parse(), and SAMT().

Here is the call graph for this function:

Here is the caller graph for this function:

ParentNodes MosesTraining::SyntaxTree::Parse (  ) 

Definition at line 57 of file SyntaxTree.cpp.

References HasNode(), and m_size.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

std::string MosesTraining::SyntaxTree::ToString (  )  const

Definition at line 116 of file SyntaxTree.cpp.


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  ,
const SyntaxTree  
) [friend]

Definition at line 165 of file SyntaxTree.cpp.


Member Data Documentation

Definition at line 94 of file SyntaxTree.h.

Referenced by GetNodes().

Definition at line 92 of file SyntaxTree.h.

Referenced by AddNode(), Clear(), ConnectNodes(), GetNodes(), and MosesTraining::operator<<().

std::vector< SyntaxNode* > MosesTraining::SyntaxTree::m_nodes [protected]

Definition at line 85 of file SyntaxTree.h.

Referenced by AddNode(), Clear(), and GetAllNodes().

Definition at line 93 of file SyntaxTree.h.

Referenced by AddNode(), GetNumWords(), and Parse().

Definition at line 86 of file SyntaxTree.h.

Referenced by Clear(), ConnectNodes(), GetTop(), and SyntaxTree().


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

Generated on Thu Jun 4 00:33:04 2015 for Moses by  doxygen 1.5.9