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

Class Cpredicate

source code

Class defining predicates

Instance Methods [hide private]
 
__init__(self, node=None)
Constructor of the object
source code
 
add_external_reference(self, ext_ref)
Adds an external reference to the role
source code
 
add_role(self, role_obj)
Add a role to the predicate
source code
 
add_roles(self, list_of_roles)
Adds a list of roles to the predicate
source code
string
get_confidence(self)
Returns the confidence of the element
source code
CexternalReference
get_external_references(self)
Iterator to get the external references
source code
string
get_id(self)
Returns the identifier of the element
source code
xml Element
get_node(self)
Returns the node of the element
source code
Crole
get_roles(self)
Iterator to get the roles
source code
Cspan
get_span(self)
Returns the span object of the element
source code
string
get_uri(self)
Returns the URI of the element
source code
 
remove_external_references(self)
Removes any external reference from the predicate
source code
 
remove_external_references_from_roles(self)
Removes any external references on any of the roles from the predicate
source code
 
set_confidence(self, conf)
Assigns the confidence to the element
source code
 
set_id(self, i)
Assigns the identifier to the element
source code
 
set_span(self, this_span)
Sets the span for the predicate
source code
 
set_uri(self, uri)
Assigns the URI to 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

add_external_reference(self, ext_ref)

source code 

Adds an external reference to the role

Parameters:

add_role(self, role_obj)

source code 

Add a role to the predicate

Parameters:
  • role_obj (Crole) - the role object

add_roles(self, list_of_roles)

source code 

Adds a list of roles to the predicate

Parameters:
  • list_of_roles (list) - list of roles

get_confidence(self)

source code 

Returns the confidence of the element

Returns: string
the confidence of the element

get_external_references(self)

source code 

Iterator to get the external references

Returns: CexternalReference
iterator for external references

get_id(self)

source code 

Returns the identifier of the element

Returns: string
the identifier of the element

get_node(self)

source code 

Returns the node of the element

Returns: xml Element
the node of the element

get_roles(self)

source code 

Iterator to get the roles

Returns: Crole
iterator for getting the role objects

get_span(self)

source code 

Returns the span object of the element

Returns: Cspan
the span object of the element

get_uri(self)

source code 

Returns the URI of the element

Returns: string
the URI of the element

set_confidence(self, conf)

source code 

Assigns the confidence to the element

Parameters:
  • conf (string) - the confidence of the predicate

set_id(self, i)

source code 

Assigns the identifier to the element

Parameters:
  • i (string) - the identififier of the predicate

set_span(self, this_span)

source code 

Sets the span for the predicate

Parameters:
  • this_span (Cspan) - the span object

set_uri(self, uri)

source code 

Assigns the URI to the element

Parameters:
  • uri (string) - the uri of the predicate