Module srl_data :: Class Csrl
[hide private]
[frames] | no frames]

Class Csrl

source code

This class encapsulates the semantic role labelling layer

Instance Methods [hide private]
 
__get_node_preds(self) source code
 
__init__(self, node=None, type='NAF')
Constructor of the object
source code
 
add_external_reference_to_role(self, role_id, ext_ref)
Adds an external reference to a role identifier
source code
 
add_predicate(self, pred_obj)
Adds a predicate object to the layer
source code
xml Element
get_node(self)
Returns the node of the element
source code
Cpredicate
get_predicates(self)
Iterator to get the roles
source code
Method Details [hide private]

__init__(self, node=None, type='NAF')
(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
  • type (string) - the type of the object (KAF or NAF)

add_external_reference_to_role(self, role_id, ext_ref)

source code 

Adds an external reference to a role identifier

Parameters:
  • role_id (string) - the role identifier
  • ext_ref (CexternalReference) - the external reference

add_predicate(self, pred_obj)

source code 

Adds a predicate object to the layer

Parameters:

get_node(self)

source code 

Returns the node of the element

Returns: xml Element
the node of the element

get_predicates(self)

source code 

Iterator to get the roles

Returns: Cpredicate
iterator for getting the predicate objects