Extract key-value information from your documents
Using AnyParser
, you can extract key-value information from your documents.
Refer to the Quickstart guide to install the AnyParser SDK and get your api key.
First, set up your AnyParser
client.
Next, you’ll need to create your extract_instruction
. This is a dictionary of the form {"key": "key description"}
where the key is the name of the key to extract and the key description is a description of that key.
Finally, use the extract_key_value
method, passing in the following:
file_path
(str): the path to the local fileextract_instruction
(dict): keys to extract and their descriptionsThis will return two things:
key_value_result
(dict): Dictionary with the keys specified in extract_instruction
, and the values extracted from the documenttotal_time
(str): the time elapsed in secondsA dictionary where the keys are the same as those in the input dictionary, and the values are the corresponding extracted results.
Check out these notebooks for more detailed examples of using both sync and async AnyParser.
Extracting key-values from a fake W2 document.
Extracting key-values from a fake W2 document.
Extract key-value information from your documents
Using AnyParser
, you can extract key-value information from your documents.
Refer to the Quickstart guide to install the AnyParser SDK and get your api key.
First, set up your AnyParser
client.
Next, you’ll need to create your extract_instruction
. This is a dictionary of the form {"key": "key description"}
where the key is the name of the key to extract and the key description is a description of that key.
Finally, use the extract_key_value
method, passing in the following:
file_path
(str): the path to the local fileextract_instruction
(dict): keys to extract and their descriptionsThis will return two things:
key_value_result
(dict): Dictionary with the keys specified in extract_instruction
, and the values extracted from the documenttotal_time
(str): the time elapsed in secondsA dictionary where the keys are the same as those in the input dictionary, and the values are the corresponding extracted results.
Check out these notebooks for more detailed examples of using both sync and async AnyParser.
Extracting key-values from a fake W2 document.
Extracting key-values from a fake W2 document.