<commit_before>#!/usr/bin/python3
# -*- coding: utf-8 -*-

from xml.sax import make_parser
from xml.sax.handler import ContentHandler

class SmallSMILHandler(ContentHandler):
    
    def __init__ (self):
        self.etiqueta = ['root-layout', 'region', 'img', 'audio', 'textstream']
        self.atributo = {'root-layout': ['width', 'height', 'background-color'],
                         'region': ['id', 'top', 'bottom', 'left', 'right']
                         'img': ['src', 'region', 'begin', 'dur']
                         'audio':['src', 'begin', 'dur']
                         'textstream': ['src', 'region']}
        self.lista = []

    def startElement(self, name, attrs):
        dicc = {}
        if name in self.etiqueta:
            dicc['name'] = name<commit_msg>small final 2<commit_after>#!/usr/bin/python3
# -*- coding: utf-8 -*-

from xml.sax import make_parser
from xml.sax.handler import ContentHandler

class SmallSMILHandler(ContentHandler):
    
    def __init__ (self):
        self.etiqueta = ['root-layout', 'region', 'img', 'audio', 'textstream']
        self.atributo = {'root-layout': ['width', 'height', 'background-color'],
                         'region': ['id', 'top', 'bottom', 'left', 'right'],
                         'img': ['src', 'region', 'begin', 'dur'],
                         'audio':['src', 'begin', 'dur'],
                         'textstream': ['src', 'region']}
        self.lista = []

    def startElement(self, name, attrs):
        dicc = {}
        if name in self.etiqueta:
            dicc['name'] = name
{'fraction_non_alphanumeric': 0.18268618714194781, 'fraction_numerical': 0.003182686187141948, 'mean_word_length': 2.112871287128713, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2805877', 'n_tokens_mistral': 476, 'n_tokens_neox': 470, 'n_words': 113}