<commit_before>## Test for parsing YAML

library(yaml)

## Load the talks
talks <- yaml.load_file("../content/talks.yaml")[[1]]

## Sort by year order
ord <- order(unlist(lapply(talks, function(x) x$year)))
talks <- talks[ord]

lines <- lapply(talks, function(x) {
    with(x, sprintf("\\ind %d ``%s''. %s, %s. %s.\n", year, title, event, city, month))
})

out.file <- "../templates/talks.tex"
file.remove(out.file)
invisible(lapply(lines, write, file=out.file, append=TRUE))<commit_msg>Fixed bug in parsing script<commit_after>## Test for parsing YAML

library(yaml)

## Load the talks
talks <- yaml.load_file("../content/talks.yaml")[[1]]

## Sort by year order
ord <- order(unlist(lapply(talks, function(x) x$year)))
talks <- talks[ord]

lines <- lapply(talks, function(x) {
    with(x, sprintf("\\ind %d ``%s''. %s, %s. %s.\n", year, title, event, city, month))
})

out.file <- "../templates/talks.tex"
if (file.exists(out.file)) file.remove(out.file)
invisible(lapply(lines, write, file=out.file, append=TRUE))
{'fraction_non_alphanumeric': 0.21083743842364533, 'fraction_numerical': 0.0019704433497536944, 'mean_word_length': 4.613259668508287, 'pattern_counts': {'":': 0, '<': 13, '<?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': '58560', 'n_tokens_mistral': 398, 'n_tokens_neox': 384, 'n_words': 91}