|
from datasets import load_dataset |
|
|
|
|
|
def load_tdk_word_dataset(dataset_path): |
|
dataset = load_dataset("csv", data_files=dataset_path) |
|
return dataset |
|
|
|
|
|
dataset_path = "/Users/misafir/Downloads/archive/tdk_word_data_all.csv" |
|
dataset = load_tdk_word_dataset(dataset_path) |
|
|
|
|
|
print(dataset) |
|
|
|
|
|
|
|
|
|
import argparse |
|
|
|
def main(): |
|
parser = argparse.ArgumentParser(description='Process some data.') |
|
parser.add_argument('--dataset_path', type=str, help='Path to the dataset file') |
|
|
|
args = parser.parse_args() |
|
|
|
if args.dataset_path: |
|
print(f'Dataset path: {args.dataset_path}') |
|
else: |
|
print("Dataset path is not provided.") |
|
|
|
if __name__ == "__main__": |
|
main() |
|
|