<commit_before>#! /usr/bin/env perl
#
# delete.pl
#
# Dictionary maintenance tool - delete words from dictionary.
# Given a list of words and a dictionary file, this script
# will delete the words from the file.
#
# It is assumed that the word-list holds one word per line,
# and that the word-list is already in alphabetical order.
#
# Example usage:
# ./delete.pl wordlist_file en/words/words.adj.1
#
# Copyright (C) 2009 <NAME> <<EMAIL>>
#

if ($#ARGV < 1)
{
	die "Usage: insert.pl wordlist-file dict-file\n";
}

# Get the word-list, and the dictionary, from the command line
my $wordlist_file = @ARGV[0];
my $dict_file = @ARGV[1];

open(WORDS, $wordlist_file);
my @words = ();
while (<WORDS>)
{
	# Get rid of newline at end of word.
	chop;
	push @words, $_;
}
close(WORDS);

my $word = shift @words;

open (DICT, $dict_file);
while (<DICT>)
{
	chop;
	my @entries = split;

	# Loop over the entries
	$gotone = 0;
	foreach (@entries)
	{
		my $entry = $_;
		while (($entry gt $word) && ($word ne ""))
		{
			$word = shift @words;
		}
		if (($entry ne $word) && ($word ne ""))
		{
			print "$entry ";
			$gotone = 1;<commit_msg>whoops, one more bug in the delete script<commit_after>#! /usr/bin/env perl
#
# delete.pl
#
# Dictionary maintenance tool - delete words from dictionary.
# Given a list of words and a dictionary file, this script
# will delete the words from the file.
#
# It is assumed that the word-list holds one word per line,
# and that the word-list is already in alphabetical order.
#
# Example usage:
# ./delete.pl wordlist_file en/words/words.adj.1
#
# Copyright (C) 2009 <NAME> <<EMAIL>>
#

if ($#ARGV < 1)
{
	die "Usage: insert.pl wordlist-file dict-file\n";
}

# Get the word-list, and the dictionary, from the command line
my $wordlist_file = @ARGV[0];
my $dict_file = @ARGV[1];

open(WORDS, $wordlist_file);
my @words = ();
while (<WORDS>)
{
	# Get rid of newline at end of word.
	chop;
	push @words, $_;
}
close(WORDS);

my $word = shift @words;

open (DICT, $dict_file);
while (<DICT>)
{
	chop;
	my @entries = split;

	# Loop over the entries
	$gotone = 0;
	foreach (@entries)
	{
		my $entry = $_;
		while (($entry gt $word) && ($word ne ""))
		{
			$word = shift @words;
		}
		if ($entry ne $word)
		{
			print "$entry ";
			$gotone = 1;
{'fraction_non_alphanumeric': 0.1509933774834437, 'fraction_numerical': 0.008830022075055188, 'mean_word_length': 3.532, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 13, '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': '1161409', 'n_tokens_mistral': 885, 'n_tokens_neox': 835, 'n_words': 290}