ontocast.tool.converter
¶
Document conversion tools for OntoCast.
This module provides functionality for converting various document formats into structured data that can be processed by the OntoCast system.
ConverterTool
¶
Bases: Tool
Tool for converting documents to structured data.
This class provides functionality for converting various document formats into structured data that can be processed by the OntoCast system.
Attributes:
Name | Type | Description |
---|---|---|
supported_extensions |
set[str]
|
Set of supported file extensions. |
Source code in ontocast/tool/converter.py
__call__(file_input)
¶
Convert a document to structured data.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
file_input
|
Union[bytes, str]
|
The input file as either a BytesIO object or file path. |
required |
Returns:
Type | Description |
---|---|
Dict[str, Any]
|
Dict[str, Any]: The converted document data. |
Source code in ontocast/tool/converter.py
__init__(**kwargs)
¶
Initialize the converter tool.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
**kwargs
|
Additional keyword arguments passed to the parent class. |
{}
|