snorkelflow.client.applications.create_text_extraction_application
- snorkelflow.client.applications.create_text_extraction_application(application_name, dataset, input_schema, extraction_field, labels, label_col=None)
Create an application with a text extraction block.
- Parameters:
application_name (
str
) – The name of the new applicationdataset (
Union
[str
,int
]) – The name or UID of the dataset which the application will useinput_schema (
List
[str
]) – A list of columns (from the dataset)extraction_field (
str
) – The field to extract fromlabels (
List
[str
]) – A string list of labels for the tasklabel_col (
Optional
[str
], default:None
) – An optional string name of a dataset column that contains labels
- Returns:
The created pplication object
- Return type:
Dict[str, Any]
Examples
>>> sf.create_text_extraction_application(
>>> APP_NAME,
>>> dataset=DATASET_NAME,
>>> input_schema=["text"],
>>> extraction_field="text",
>>> labels=["label1", "label2"],
>>> label_col="label",
>>> )
{
'application_uid': <application_uid>,
'name': <name>,
'dataset_uid': <dataset_uid>,
'description': <description>,
'application_config': <application_config_dict>, # Contains input schema
'created_at': <timetamp>,
'node_dag': <node_dag>, # contains list of nodes and it's input node
'access_config': <access_config>,
'hydrated_node_dag': <hydrated_node_dag> # Contains list of it's node and it's config
}