<commit_before>#
# An example of parsing hackaday.com
# (C) 2013 <NAME>
#
$LOAD_PATH.unshift __dir__
require File.expand_path('lib/docparser.rb', __dir__)
require 'tmpdir'

include DocParser
output = MultiOutput.new(filename: 'hackaday.html')
output.header = 'Title', 'Author', 'Publication date', 'URL', 'Summary'
files = Dir[File.join(__dir__, 'test/support/hackaday/*.html')]
parser = Parser.new(files: files, parallel: false, output: output)<commit_msg>Updated example filename<commit_after>#
# An example of parsing hackaday.com
# (C) 2013 <NAME>
#
$LOAD_PATH.unshift __dir__
require File.expand_path('lib/docparser.rb', __dir__)
require 'tmpdir'

include DocParser
output = MultiOutput.new(filename: 'hackaday')
output.header = 'Title', 'Author', 'Publication date', 'URL', 'Summary'
files = Dir[File.join(__dir__, 'test/support/hackaday/*.html')]
parser = Parser.new(files: files, parallel: false, output: output)
{'fraction_non_alphanumeric': 0.1532608695652174, 'fraction_numerical': 0.008695652173913044, 'mean_word_length': 6.675, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '2578704', 'n_tokens_mistral': 323, 'n_tokens_neox': 305, 'n_words': 77}