bioctable
autocorpus.ac_bioc.bioctable
¤
BioCTable Package.
This package provides classes for handling modified BioC table structures, including cells, collections, documents, JSON encoding, and passages.
Classes¤
BioCTableCell(cell_id=str(), cell_text=str())
dataclass
¤
Represents a cell in a table.
BioCTableCollection(source=str(), date=str(), key=str(), documents=list(), infons=dict())
dataclass
¤
BioCTableDocument(id=str(), inputfile=str(), infons=dict(), passages=list(), relations=list(), annotations=list())
dataclass
¤
BioCTableJSON
¤
Utility class for serializing BioCTableCollection objects to JSON.
Functions¤
dump(obj, fp, **kwargs)
staticmethod
¤
Serialize a BioCTableCollection object to a JSON file-like object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
obj
|
object The object to serialize. |
required | |
fp
|
file-like object The file-like object to write the JSON data to. |
required | |
**kwargs
|
dict
Additional keyword arguments to pass to |
{}
|
Source code in autocorpus/ac_bioc/bioctable/json.py
82 83 84 85 86 87 88 89 90 91 92 93 94 |
|
dumps(obj, **kwargs)
staticmethod
¤
Serialize a BioCTableCollection object to a JSON-formatted string.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
obj
|
object The object to serialize. |
required | |
**kwargs
|
dict
Additional keyword arguments to pass to |
{}
|
Returns:
Type | Description |
---|---|
str A JSON-formatted string representation of the object. |
Source code in autocorpus/ac_bioc/bioctable/json.py
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
|