<commit_before>#include "arith_grammar.h"
#include "ast.h"
#include "peggo.h"

int main(void) {
  char *source = "(-4*(1+2)+3)";
  parse_t *result = parse(source, arith_grammar());
  ast_t *a = extract(source, result);
  print_ast(a);
  return 0;
}<commit_msg>Clean up<commit_after>#include "arith_grammar.h"
#include "ast.h"
#include "peggo.h"

ast_t *parse_extract(char *s, grammar_t *g) {
  return extract(s, parse(s, g));
}

int main(void) {
  char *source = "(-4*(1+2)+3)";
  print_ast(parse_extract(source, arith_grammar()));
  return 0;
}
{'fraction_non_alphanumeric': 0.1944954128440367, 'fraction_numerical': 0.01834862385321101, 'mean_word_length': 5.423529411764706, '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': '6676337', 'n_tokens_mistral': 235, 'n_tokens_neox': 232, 'n_words': 47}