19 #include "spear/Morpher.h"
54 : _source(src.operator->()),
55 _destination(dest.operator->()),
56 _type(type), _qualifier(qual)
64 _source(src), _destination(dest),
65 _type(type), _qualifier(qual) {};
82 void displayProlog(
OStream & os)
const;
95 static String NULL_QUALIFIER;
149 const String & getHeadLemma();
152 const String & getLemma();
157 return (_children.empty() ==
true && _word.empty() ==
false);
164 if(atEnd ==
true)_children.push_back(c);
165 else _children.push_front(c);
169 {
return _children; };
176 {
return _children; };
179 { _patterns.push_back(p); };
182 {
return _patterns; };
218 bool showHead =
false
252 void displayPrologPhrase(
OStream & os)
const;
258 void displayPrologPatterns(
OStream & os,
259 bool & printComma)
const;
262 void setPosition(
short & current);
278 std::list< RCIPtr<spear::Tree> > _children;
280 std::list< RCIPtr<spear::Pattern> > _patterns;
void setLemma(const String &lemma)
Definition: Tree.h:145
void setLabel(const String &label)
Definition: Tree.h:130
const String & getHeadWord() const
Definition: Tree.cc:355
Reference counting pointer class This file contains the code for the classes and class templates maki...
const String & getHeadNe() const
Definition: Tree.cc:413
Tree(const String &word, const String &label)
Definition: Tree.h:107
short getHeadPosition() const
Definition: Tree.cc:383
std::list< RCIPtr< spear::Tree > >::const_iterator const_iterator
Definition: Tree.h:248
bool isTerminal() const
Definition: Tree.h:155
void setWord(const String &w)
Definition: Tree.h:126
void setVerbType(const spear::VerbType &vt)
Definition: Tree.h:188
#define OStream
Definition: Wide.h:38
void addChild(const RCIPtr< spear::Tree > &c, bool atEnd=true)
Definition: Tree.h:160
void clear()
Definition: Tree.h:194
RCIPtr< Pattern > PatternPtr
Definition: Tree.h:98
const PatternType & getType() const
Definition: Tree.h:71
Tree()
Definition: Tree.h:105
void displayType(OStream &os) const
Definition: Tree.cc:269
void displayPatterns(OStream &os, int offset=0) const
Definition: Tree.cc:323
spear::Tree * getSource() const
Definition: Tree.h:67
void displayPrettyParens(OStream &os, int offset=0, bool showHead=false) const
Definition: Tree.cc:103
RCIPtr< spear::Tree > TreePtr
Definition: Tree.h:295
bool hasPatterns() const
Definition: Tree.cc:339
const RCIPtr< spear::Tree > & getHead() const
Definition: Tree.h:132
const String & getNe() const
Definition: Tree.h:192
Pattern(const RCIPtr< spear::Tree > &src, const RCIPtr< spear::Tree > &dest, const PatternType &type, Tree *qual=NULL)
Definition: Tree.h:49
void display(OStream &os) const
Definition: Tree.cc:283
#define String
Definition: Wide.h:36
const String & getLabel() const
Definition: Tree.h:128
std::list< RCIPtr< spear::Tree > > & children()
Definition: Tree.h:175
short getPosition() const
Definition: Tree.h:239
const spear::VerbType & getVerbType() const
Definition: Tree.h:186
const String & getWord() const
Definition: Tree.h:124
void setHead(const RCIPtr< spear::Tree > &h)
Definition: Tree.h:143
OStream & operator<<(OStream &os, const spear::TreePtr &tree)
Definition: Tree.cc:50
const std::list< RCIPtr< spear::Tree > > & getChildren() const
Definition: Tree.h:168
const String & getQualifierString() const
Definition: Tree.cc:313
#define dest(triedge, pointptr)
Definition: triangle.c:938
spear::Tree * getQualifier() const
Definition: Tree.h:75
Tree(const String &label)
Definition: Tree.h:117
VerbType
Definition: Tree.h:36
const std::list< RCIPtr< spear::Pattern > > & getPatterns() const
Definition: Tree.h:181
void setNe(const String &ne)
Definition: Tree.h:190
#define W(X)
Definition: Wide.h:45
const String & getHeadTag() const
Definition: Tree.cc:369
void display(OStream &os, bool isHead=false, int offset=0) const
Definition: Tree.cc:24
spear::Tree * getDestination() const
Definition: Tree.h:69
PatternType
Definition: Tree.h:26
for m
Definition: APPgetLargeConnectedEdges.m:64
Pattern(Tree *src, Tree *dest, const PatternType &type, Tree *qual=NULL)
Definition: Tree.h:59
short setPositions()
Definition: Tree.cc:442
void displayParens(OStream &os, bool showHead=true) const
Definition: Tree.cc:66
void displayProlog(OStream &os, int index) const
void addPattern(const RCIPtr< spear::Pattern > &p)
Definition: Tree.h:178
std::list< RCIPtr< spear::Tree > >::iterator iterator
Definition: Tree.h:239