langtest.datahandler.datasource.JSONDataset#
- class JSONDataset(file_path: str)#
Bases:
_IDataset
Class to handle JSON dataset files. Subclass of _IDataset.
- __init__(file_path: str)#
Initializes JSONDataset object. :param file_path: Path to the data file. :type file_path: str
Methods
__init__
(file_path)Initializes JSONDataset object.
export_data
(data, output_path)Exports the data to the corresponding format and saves it to 'output_path'.
load_data
()- export_data(data: List[Sample], output_path: str)#
Exports the data to the corresponding format and saves it to ‘output_path’. :param data: data to export :type data: List[Sample] :param output_path: path to save the data to :type output_path: str