Module constituency_data :: Class Cedge
[hide private]
[frames] | no frames]

Class Cedge

source code

This class encapsulates an edge object

Instance Methods [hide private]
 
__init__(self, node=None)
Constructor of the object
source code
 
__str__(self) source code
string
get_from(self)
Returns the from label
source code
string
get_head(self)
Returns whether the from is head of the constituent (None if not)
source code
string
get_id(self)
Returns the identifier of the object
source code
xml Element
get_node(self)
Returns the node of the element
source code
string
get_to(self)
Returns the to label
source code
 
set_as_head(self)
Sets the edge as a head element
source code
 
set_comment(self, c)
Sets the comment for the element
source code
 
set_from(self, this_from)
Sets the identifier for the element
source code
 
set_id(self, this_id)
Sets the identifier for the element
source code
 
set_to(self, this_to)
Sets the identifier for the element
source code
Method Details [hide private]

__init__(self, node=None)
(Constructor)

source code 

Constructor of the object

Parameters:
  • node (xml Element or None (to create and empty one)) - this is the node of the element. If it is None it will create a new object

get_from(self)

source code 

Returns the from label

Returns: string
the from label of the relation

get_head(self)

source code 

Returns whether the from is head of the constituent (None if not)

Returns: string
the to label of the relation

get_id(self)

source code 

Returns the identifier of the object

Returns: string
identifier of the terminal object

get_node(self)

source code 

Returns the node of the element

Returns: xml Element
the node of the element

get_to(self)

source code 

Returns the to label

Returns: string
the to label of the relation

set_comment(self, c)

source code 

Sets the comment for the element

Parameters:
  • c (string) - comment for the element

set_from(self, this_from)

source code 

Sets the identifier for the element

Parameters:
  • this_from (string) - from label

set_id(self, this_id)

source code 

Sets the identifier for the element

Parameters:
  • this_id (string) - identifier

set_to(self, this_to)

source code 

Sets the identifier for the element

Parameters:
  • this_to (string) - to label