compass.plugin.ordinance.BaseParser#
- class BaseParser[source]#
Bases:
ABCExtract succinct extraction text from input
Methods
parse(text)Parse text and extract structured data
Attributes
Identifier for text ingested by this class
Identifier for final structured data output
ID to use for this extraction for linking with LLM configs
- TASK_ID = 'data_extraction'#
ID to use for this extraction for linking with LLM configs
- abstractmethod async parse(text)[source]#
Parse text and extract structured data
- Parameters:
text (
str) – Text which may or may not contain information relevant to the current extraction.- Returns:
pandas.DataFrameorNone– DataFrame containing structured extracted data. Can also beNoneif no relevant values can be parsed from the text.