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

"""Read and parse data from the lanking project."""

import os
import glob
import json
import re

import logging
import sys

logging.basicConfig(format='%(asctime)s %(levelname)s %(message)s',
                    level=logging.DEBUG,
                    stream=sys.stdout)


def remove_matching_braces(latex):
    """
    If `latex` is surrounded by matching braces, remove them. They are not
    necessary.

    Parameters
    ----------
    latex : string

    Returns
    -------<commit_msg>clean up.<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""Read and parse data from the lanking project."""

import logging
import sys

logging.basicConfig(format='%(asctime)s %(levelname)s %(message)s',
                    level=logging.DEBUG,
                    stream=sys.stdout)


def remove_matching_braces(latex):
    """
    If `latex` is surrounded by matching braces, remove them. They are not
    necessary.

    Parameters
    ----------
    latex : string

    Returns
    -------
{'fraction_non_alphanumeric': 0.14016933207902163, 'fraction_numerical': 0.0018814675446848542, 'mean_word_length': 2.2839506172839505, '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': '5607244', 'n_tokens_mistral': 325, 'n_tokens_neox': 306, 'n_words': 89}