Module coreference_data :: Class Ccoreference
[hide private]
[frames] | no frames]

Class Ccoreference

source code

This class encapsulates a coreference object in KAF/NAF

Instance Methods [hide private]
 
__init__(self, node=None, type='NAF')
Constructor of the object
source code
 
add_span(self, term_span)
Adds a list of term ids a new span in the references
source code
CexternalReference
get_external_references(self)
Iterator to get the external references
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
Cspan
get_spans(self)
Iterator that returns all the span objects of the corerefence
source code
string
get_type(self)
Returns the type of the coreference object
source code
 
set_id(self, this_id)
Sets the identifier of the object
source code
 
set_type(self, this_type)
Sets the type of the coreference object
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_span(self, term_span)

source code 

Adds a list of term ids a new span in the references

Parameters:
  • term_span (list) - list of term ids

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 object

Returns: string
identifier of the corefence object

get_node(self)

source code 

Returns the node of the element

Returns: xml Element
the node of the element

get_spans(self)

source code 

Iterator that returns all the span objects of the corerefence

Returns: Cspan
list of span objects for the coreference object

get_type(self)

source code 

Returns the type of the coreference object

Returns: string
type of the corefence object