#!/usr/bin/perl

# txt2hash

convert('AutoPhraseWT.txt','AutoPhraseWordTypes');
convert('AutoPhraseSS.txt','AutoPhraseSentenceStructures');

sub convert {
 my $txtFile=$_[0];
 my $hashFile=$_[1];
 dbmopen(%H,$hashFile,0666);
 open(F,$txtFile);
 while ($l=<F>) {
  chomp($l);
  ($key,$value)=split(/=/,$l);
  $H{$key}=$value;
 }
 close F;
 dbmclose(%H);
}
