KJB
|
#include <Tree.h>
Public Types | |
typedef std::list< RCIPtr < spear::Tree > >::iterator | iterator |
typedef std::list< RCIPtr < spear::Tree > >::const_iterator | const_iterator |
Public Member Functions | |
Tree () | |
Tree (const String &word, const String &label) | |
Tree (const String &label) | |
const String & | getWord () const |
void | setWord (const String &w) |
const String & | getLabel () const |
void | setLabel (const String &label) |
const RCIPtr< spear::Tree > & | getHead () const |
const String & | getHeadWord () const |
short | getHeadPosition () const |
const String & | getHeadNe () const |
const String & | getHeadTag () const |
void | setHead (const RCIPtr< spear::Tree > &h) |
void | setLemma (const String &lemma) |
bool | isTerminal () const |
void | addChild (const RCIPtr< spear::Tree > &c, bool atEnd=true) |
const std::list< RCIPtr < spear::Tree > > & | getChildren () const |
std::list< RCIPtr< spear::Tree > > & | children () |
void | addPattern (const RCIPtr< spear::Pattern > &p) |
const std::list< RCIPtr < spear::Pattern > > & | getPatterns () const |
bool | hasPatterns () const |
const spear::VerbType & | getVerbType () const |
void | setVerbType (const spear::VerbType &vt) |
void | setNe (const String &ne) |
const String & | getNe () const |
void | clear () |
void | display (OStream &os, bool isHead=false, int offset=0) const |
void | displayParens (OStream &os, bool showHead=true) const |
void | displayPrettyParens (OStream &os, int offset=0, bool showHead=false) const |
void | displayProlog (OStream &os, int index) const |
void | displayPatterns (OStream &os, int offset=0) const |
short | setPositions () |
short | getPosition () const |
Public Member Functions inherited from spear::RCObject | |
void | addReference () |
void | removeReference () |
Additional Inherited Members | |
Public Attributes inherited from spear::RCObject | |
unsigned short | refCount |
Protected Member Functions inherited from spear::RCObject | |
RCObject () | |
RCObject (const RCObject &rhs) | |
RCObject & | operator= (const RCObject &rhs) |
virtual | ~RCObject ()=0 |
typedef std::list< RCIPtr<spear::Tree> >::const_iterator spear::Tree::const_iterator |
typedef std::list< RCIPtr<spear::Tree> >::iterator spear::Tree::iterator |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Returns non-const children list Note: Use with care! Update _head if children are changed!
|
inline |
void Tree::display | ( | OStream & | os, |
bool | isHead = false , |
||
int | offset = 0 |
||
) | const |
void Tree::displayParens | ( | OStream & | os, |
bool | showHead = true |
||
) | const |
void Tree::displayPatterns | ( | OStream & | os, |
int | offset = 0 |
||
) | const |
void Tree::displayPrettyParens | ( | OStream & | os, |
int | offset = 0 , |
||
bool | showHead = false |
||
) | const |
void spear::Tree::displayProlog | ( | OStream & | os, |
int | index | ||
) | const |
Display the tree as a Prolog predicate
|
inline |
|
inline |
const String & Tree::getHeadNe | ( | ) | const |
short Tree::getHeadPosition | ( | ) | const |
const String & Tree::getHeadTag | ( | ) | const |
Returns the POS tag associated with the head word
const String & Tree::getHeadWord | ( | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
bool Tree::hasPatterns | ( | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
short Tree::setPositions | ( | ) |
Sets the _position fields for all terminal edges in this phrase The first token gets position 1 Returns the number of terminals in this sentence
|
inline |
|
inline |