use jspell::dict;
use Data::Dumper;

$dic = jspell::dict::init("../../../dicionarios/jspell.pt/port.dic");

#$dic->extra_words;
#$dic->not_categorized;
#$dic->for_this_cat_I_want_only_these_flags("#nc","eafed");
#$dic->delete_word("Alberto");
#$dic->add_flag("O","Alberto");

$dic->foreach_word(sub {
		     my $word = shift;
		     my $attrs = shift;
		     my $flags = shift;
		     if ($attrs->{CAT} eq "nc" && !grep{m!^p$!}@$flags) {
		       print "add_flag('p',$word)\n";
		     }
});
