MCPcopy Create free account
hub / github.com/hankcs/HanLP / remove_node_attribute

Method remove_node_attribute

plugins/hanlp_common/hanlp_common/amr.py:444–448  ·  view source on GitHub ↗
(self, node, attr, value)

Source from the content-addressed store, hash-verified

442 self._triples = penman.alphanum_order(triples)
443
444 def remove_node_attribute(self, node, attr, value):
445 node.remove_attribute(attr, value)
446 triples = [t for t in self._triples if
447 not (t.source == node.identifier and t.relation == attr and t.target == value)]
448 self._update_penman_graph(triples)
449
450 def add_node_attribute(self, node, attr, value):
451 node.add_attribute(attr, value)

Callers 2

remove_node_opsMethod · 0.95
remove_unknown_nodesMethod · 0.80

Calls 2

_update_penman_graphMethod · 0.95
remove_attributeMethod · 0.80

Tested by

no test coverage detected