relation
autocorpus.ac_bioc.relation
¤
This module defines the BioCRelation class.
Classes¤
BioCRelation(id=str(), infons=dict(), nodes=list())
dataclass
¤
Bases: DataClassJsonMixin
A class representing a BioC relation.
Functions¤
from_xml(elem)
classmethod
¤
Create a BioCRelation instance from an XML element.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
elem
|
Element
|
An XML element containing the relation data. |
required |
Returns:
Name | Type | Description |
---|---|---|
BioCRelation |
BioCRelation
|
An instance of BioCRelation created from the XML element. |
Source code in autocorpus/ac_bioc/relation.py
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
|
to_xml()
¤
Convert the BioCRelation instance to an XML element.
Returns:
Type | Description |
---|---|
Element
|
ET.Element: An XML element representation of the BioCRelation instance. |
Source code in autocorpus/ac_bioc/relation.py
21 22 23 24 25 26 27 28 29 30 31 32 33 |
|