File size: 327 Bytes
4c895ac |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
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}')
|