<commit_before>import html5lib
from html5lib import treebuilders
from lxml import etree
from os import path

from functions import *

#def doParse(date, reparse=False, refetch=False):
#    input_db = redis.Redis(host='localhost', port=6379, db=1)
#    output_db = redis.Redis(host='localhost', port=6379, db=2)
#    
#    if date not in input_db or refetch:
#        fetchReport(date, refetch=refetch)
#    
#    if date in output_db and not reparse:
#        return output_db[date]
#    else:
#        input_doc = input_db[date]
#        output_doc = parse(input_doc)
#        output_db[date] = output_doc

def parse(input_doc):
 
    parser = html5lib.HTMLParser(tree=treebuilders.getTreeBuilder("lxml"))
    etree_document = parser.parse(input_doc)
       
    ns = etree.FunctionNamespace('http://www.kurtraschke.com/functions')
    ns.prefix = 'pyf'
    ns['fix_names'] = fix_names
    ns['fix_datetime'] = fix_datetime
    ns['produce_id'] = produce_id<commit_msg>Remove dead code.<commit_after>import html5lib
from html5lib import treebuilders
from lxml import etree
from os import path

from functions import *

def parse(input_doc):
 
    parser = html5lib.HTMLParser(tree=treebuilders.getTreeBuilder("lxml"))
    etree_document = parser.parse(input_doc)
       
    ns = etree.FunctionNamespace('http://www.kurtraschke.com/functions')
    ns.prefix = 'pyf'
    ns['fix_names'] = fix_names
    ns['fix_datetime'] = fix_datetime
    ns['produce_id'] = produce_id
{'fraction_non_alphanumeric': 0.11224489795918367, 'fraction_numerical': 0.010884353741496598, 'mean_word_length': 3.919732441471572, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '2714078', 'n_tokens_mistral': 504, 'n_tokens_neox': 493, 'n_words': 104}