<commit_before># encoding: UTF-8

require 'treetop'

require 'strings-parser/strings'
require 'strings-parser/nodes'

module StringsParser
  # to kinda mask the redundancy Treetop generates
  Parser = StringsParser
end

# File.unlink("/Users/cdutro/workspace/strings-parser/strings.rb")
# puts `tt /Users/cdutro/workspace/strings-parser/strings.treetop`

# tree = StringsParser::Parser.new.parse("/* A very cool string */\n\"hello\"=\"hola\"")
# parser = StringsParser::Parser.new
# data = File.read("/Users/cdutro/workspace/twitter-ios/Twitter/Localization/en.lproj/Localizable.strings").force_encoding("UTF-16BE").encode("UTF-8")
# data = File.read("/Users/cdutro/Desktop/Localizable.strings")
# tree = parser.parse(data)
# puts data.inspect
# puts tree.inspect
# arr = tree.each.to_a<commit_msg>Removing unnecessary comments<commit_after># encoding: UTF-8

require 'treetop'

require 'strings-parser/strings'
require 'strings-parser/nodes'

module StringsParser
  # to kinda mask the redundancy Treetop generates
  Parser = StringsParser
end
{'fraction_non_alphanumeric': 0.13697318007662834, 'fraction_numerical': 0.004789272030651341, 'mean_word_length': 5.295180722891566, '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': '3788401', 'n_tokens_mistral': 351, 'n_tokens_neox': 338, 'n_words': 68}