summaryrefslogtreecommitdiff
path: root/gi/scfg/abc/Release/process_grammar.pl
diff options
context:
space:
mode:
authorChris Dyer <cdyer@cab.ark.cs.cmu.edu>2012-05-27 00:43:48 -0400
committerChris Dyer <cdyer@cab.ark.cs.cmu.edu>2012-05-27 00:43:48 -0400
commit425a6300f2ec00a44d3f23cb43c239bec58cf765 (patch)
treef860b010ab8bab40515c626338198b5a0841cfd2 /gi/scfg/abc/Release/process_grammar.pl
parent34e6505898a7721ba94c8eb79e0130b4b6ef9346 (diff)
remove dead code
Diffstat (limited to 'gi/scfg/abc/Release/process_grammar.pl')
-rw-r--r--gi/scfg/abc/Release/process_grammar.pl36
1 files changed, 0 insertions, 36 deletions
diff --git a/gi/scfg/abc/Release/process_grammar.pl b/gi/scfg/abc/Release/process_grammar.pl
deleted file mode 100644
index f82a8e5a..00000000
--- a/gi/scfg/abc/Release/process_grammar.pl
+++ /dev/null
@@ -1,36 +0,0 @@
-#!perl
-
-use warnings;
-use strict;
-
-my $grammar_file = $ARGV[0];
-
-my %nt_count; #maps nt--> count rules whose lhs is nt
-
-open(G, "<$grammar_file") or die "Can't open file $grammar_file";
-
-while (<G>){
-
- chomp();
-
- s/\|\|\|.*//g;
- s/\s//g;
-
- $nt_count{$_}++;
-}
-
-
-close (G);
-
-open(G, "<$grammar_file") or die "Can't open file $grammar_file";
-
-while (<G>){
-
- chomp();
-
- (my $nt = $_) =~ s/\|\|\|.*//g;
- $nt =~ s/\s//g;
-
- s/(.+\|\|\|.+\|\|\|.+\|\|\|).+/$1/g;
- print $_ . " MinusLogP=" .(log($nt_count{$nt})) ."\n";
-}