<commit_before>module CodeGenerator where

generateLaTeX :: [(String, String)] -> String
generateLaTeX intRep = go intRep "" 
    where
        go :: [(String, String)] -> String -> String
        go [] output = output
        go intRep output
            -- Opening tags
            | token == "sTag" && attribute == "startDocument" = go (tail intRep) (output ++ "\\documentclass[11pt]{article}\n\n\\begin{document}\n\n")
            | token == "sTag" && attribute == "bold" = go (tail intRep) (output ++ "\\textbf{")
            | token == "sTag" && attribute == "italics" = go (tail intRep) (output ++ "\\textit{")
            | token == "sTag" && attribute == "em" = go (tail intRep) (output ++ "\\textit{")
            | token == "sTag" && attribute == "pre" = go (tail intRep) (output ++ "\\begin{verbatim}")

            -- Closing tags
            | token == "eTag" && attribute == "p" = go (tail intRep) (output ++ "\n\n")<commit_msg>Changed param to use (x:xs) syntax<commit_after>module CodeGenerator where

generateLaTeX :: [(String, String)] -> String
generateLaTeX intRep = go intRep "" 
    where
        go :: [(String, String)] -> String -> String
        go [] output = output
        go (ir:irs) output
            -- Opening tags
            | token == "sTag" && attribute == "startDocument" = go (tail intRep) (output ++ "\\documentclass[11pt]{article}\n\n\\begin{document}\n\n")
            | token == "sTag" && attribute == "bold" = go (tail intRep) (output ++ "\\textbf{")
            | token == "sTag" && attribute == "italics" = go (tail intRep) (output ++ "\\textit{")
            | token == "sTag" && attribute == "em" = go (tail intRep) (output ++ "\\textit{")
            | token == "sTag" && attribute == "pre" = go (tail intRep) (output ++ "\\begin{verbatim}")

            -- Closing tags
            | token == "eTag" && attribute == "p" = go (tail intRep) (output ++ "\n\n")
{'fraction_non_alphanumeric': 0.19381875327396542, 'fraction_numerical': 0.0020953378732320588, 'mean_word_length': 2.3865248226950353, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '1425783', 'n_tokens_mistral': 585, 'n_tokens_neox': 556, 'n_words': 166}