<jupyter_start><jupyter_text>For demo purposes on how to annotate non-image data, we took a dataset of sms from https://www.dt.fee.unicamp.br/~tiago/smsspamcollection/. This dataset, already contains the category, we take only the sms to demo the annotation process<jupyter_code># We need to create a list of the obervations, 
# if each sms would be in a different file, the observations could be just the path to such files

observations_path = "../test-data/classification-spam/SMSSpamCollection.txt"
observations = []
with open(observations_path) as file:
    for line in file:
        _, sms = line.split("\t")
        observations.append(sms)<jupyter_output><empty_output><jupyter_text>BASE EXAMPLE<jupyter_code>import sys
sys.path.insert(0, "../")

from odin.classes import TaskType
from odin.annotator import  DatasetAnnotatorClassification


output_path = "../test-data/classification-spam"
output_name = "sms_spams"

task_type = TaskType.CLASSIFICATION_SINGLE_LABEL
classes = ["spam", "legitimate"]
# We need to specify what we will show
def custom_display_function(record):
    print(record["observation"])
    
ds_generator = DatasetAnnotatorClassification(task_type, observations, output_path, output_name, classes, 
                                       is_image=False, custom_display_function=custom_display_function)
ds_generator.start_classification()
ds_generator.print_statistics()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.08951048951048951, 'fraction_numerical': 0.0006993006993006993, 'mean_word_length': 4.888888888888889, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 1, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '573155', 'license': 'Apache-2.0', 'n_tokens_mistral': 441, 'n_tokens_neox': 432, 'n_words': 116, 'path': 'examples/create_classification_ds_no_images_ds.ipynb', 'repo_name': 'rnt-pmi/odin', 'size': '1430'}