def __init__(self, coref, element):
        """
        Constructor method
        
        :param coref: a coreference grouping
        :type coref: corenlp_xml.coreference.Coreference
        :param element: an xml element
        :type element: lxml.etree.ElementBase
        
        """
        self._coref = coref
        self._element = element
        self._start = int(element.xpath('start/text()')[0])
        self._end = int(element.xpath('end/text()')[0])
        self._sentence_id = int(element.xpath('sentence/text()')[0])
        self._sentence = None
        self._head_id = int(element.xpath('head/text()')[0])
        self._head = None
        texts = element.xpath('text/text()')
        self.text = texts[0] if len(texts) > 0 else ''
def __init__ ( self , coref , element ) : self . _coref = coref self . _element = element self . _start = int ( element . xpath ( 'start/text()' ) [ 0 ] ) self . _end = int ( element . xpath ( 'end/text()' ) [ 0 ] ) self . _sentence_id = int ( element . xpath ( 'sentence/text()' ) [ 0 ] ) self . _sentence = None self . _head_id = int ( element . xpath ( 'head/text()' ) [ 0 ] ) self . _head = None texts = element . xpath ( 'text/text()' ) self . text = texts [ 0 ] if len ( texts ) > 0 else ''
Constructor method
        
        :param coref: a coreference grouping
        :type coref: corenlp_xml.coreference.Coreference
        :param element: an xml element
        :type element: lxml.etree.ElementBase