Loaders
Load a list of Example data from JSON represented records in the Prodigy format.
json_to_examples(data)
¶
Show source code in recon/loaders.py
44 45 46 47 48 49 50 51 52 53 |
|
Convert List of Dicts to List of typed Examples
Parameters
Name | Type | Description | Default |
---|---|---|---|
data |
List[Dict[str, Any]] |
Input List of Dicts to convert | required |
Returns
Type | Description |
---|---|
List[recon.types.Example] |
List[Example]: List of typed Examples |
read_json(path)
¶
Show source code in recon/loaders.py
30 31 32 33 34 35 36 37 38 39 40 41 |
|
Read annotations in JSON file format
Parameters
Name | Type | Description | Default |
---|---|---|---|
path |
Path |
Path to data | required |
Returns
Type | Description |
---|---|
List[recon.types.Example] |
List[Example]: List of examples |
read_jsonl(path)
¶
Show source code in recon/loaders.py
16 17 18 19 20 21 22 23 24 25 26 27 |
|
Read annotations in JSONL file format
Parameters
Name | Type | Description | Default |
---|---|---|---|
path |
Path |
Path to data | required |
Returns
Type | Description |
---|---|
List[recon.types.Example] |
List[Example]: List of examples |