<commit_before>source("r2cv.r")
library('gitBasedProjects')
setupProjectStructure()

cvFileNames = c(short = 'cv-short.r', long = 'cv-long.r')

source("standardApplications/coverLetter.r")

files = list.files(dir, full.names = TRUE)

findCVsection <- function(name) {
    file = files[grepl(name, files)]
    if (length(file) == 0) file = paste('example', name, sep = '-')
        else file = file[1]
    return(file)
}

cvShrtFile = findCVsection(cvFileNames['short'])
cvLongFile = findCVsection(cvFileNames['long'])

if (!exists('shrtCVchange')) shrtCVchange = ''
if (!exists('longCVchange')) longCVchange = ''

cvExtraFile = list.files(dir, pattern='cv-', full.names = TRUE)
cvExtraFile = cvExtraFile[!apply(sapply(cvFileNames, grepl, cvExtraFile),1,any)]

files = c(cvShrtFile, cvLongFile, cvExtraFile)<commit_msg>skip extra cvs if thee is none<commit_after>source("r2cv.r")
library('gitBasedProjects')
setupProjectStructure()

cvFileNames = c(short = 'cv-short.r', long = 'cv-long.r')

source("standardApplications/coverLetter.r")

files = list.files(dir, full.names = TRUE)

findCVsection <- function(name) {
    file = files[grepl(name, files)]
    if (length(file) == 0) file = paste('example', name, sep = '-')
        else file = file[1]
    return(file)
}

cvShrtFile = findCVsection(cvFileNames['short'])
cvLongFile = findCVsection(cvFileNames['long'])

if (!exists('shrtCVchange')) shrtCVchange = ''
if (!exists('longCVchange')) longCVchange = ''

cvExtraFile = list.files(dir, pattern='cv-', full.names = TRUE)
if (length(cvExtraFile)>0) cvExtraFile = cvExtraFile[!apply(sapply(cvFileNames, grepl, cvExtraFile),1,any)]

files = c(cvShrtFile, cvLongFile, cvExtraFile)
{'fraction_non_alphanumeric': 0.16726190476190475, 'fraction_numerical': 0.005357142857142857, 'mean_word_length': 5.917695473251029, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 4, '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': '2211468', 'n_tokens_mistral': 591, 'n_tokens_neox': 580, 'n_words': 111}