import json | |
# Path to your JSON file | |
file_path = '/home/yiyangai/stephenqs/datasets/Wikipedia-Knowledge-2M/Wikipedia_2M.json' | |
# Load the JSON data | |
with open(file_path, 'r') as f: | |
data = json.load(f) | |
# Count the number of examples | |
num_examples = len(data) | |
print(f'The number of examples in the file is: {num_examples}') | |