Hi, I tried out the code snipped below and it returns None, an object of type NoneType. Does this mean the databases is empty? or that my annotations did not get saved? because I have saved them through the UI. What do you think might be the problem?
Thanks in advance
from prodigy.components.db import connect from collections import defaultdict db = connect() examples = db.get_dataset("Tabuk_city") print(examples) label_stats = defaultdict(list) for eg in examples: if eg["answer"] == "accept": # you probably want to exclude ignored/rejected answers? for span in eg.get("spans", ): word = eg["text"][span["start"]:span["end"]] # slice of the text label = span["label"] label_stats[label].append(word) print(label_stats)