<commit_before>import os
import subprocess
import threading
import logging


class ExternalTextProcessor(object):

    def __init__(self, cmd):
        self.cmd = cmd
        self.proc = None
        self.output = ""

    def process(self, text, timeout=60.0):
        # timeout in seconds<commit_msg>unicode everywhere<commit_after>import os
import subprocess
import threading
import logging


class ExternalTextProcessor(object):

    def __init__(self, cmd):
        self.cmd = cmd
        self.proc = None
        self.output = u""

    def process(self, text, timeout=60.0):
        # timeout in seconds
{'fraction_non_alphanumeric': 0.08552631578947369, 'fraction_numerical': 0.009868421052631578, 'mean_word_length': 2.9038461538461537, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '3926167', 'n_tokens_mistral': 178, 'n_tokens_neox': 166, 'n_words': 51}