Sha256: db58b986b62452121e94b4036d76d5fa17304c9f94ea830dcbaa4de7693797ae
Contents?: true
Size: 1.11 KB
Versions: 4
Compression:
Stored size: 1.11 KB
Contents
# included modification for KAF/NAF from term_sentiment_data import Cterm_sentiment from lxml import etree class CexternalReference: def __init__(self,node=None): self.type= 'NAF/KAF' #self.resource = self.reference = self.reftype = self.status = self.source = self.confidence = '' if node is None: self.node = etree.Element('externalRef') else: self.node = node def get_node(self): return self.node def set_resource(self,resource): self.node.set('resource',resource) def set_confidence(self,confidence): self.node.set('confidence',confidence) def set_reference(self,reference): self.node.set('reference',reference) class CexternalReferences: def __init__(self,node=None): if node is None: self.node = etree.Element('externalReferences') else: self.node = node def add_external_reference(self,ext_ref): self.node.append(ext_ref.get_node()) def get_node(self): return self.node
Version data entries
4 entries across 4 versions & 2 rubygems