summaryrefslogtreecommitdiff
path: root/word-aligner/extract_weights.pl
diff options
context:
space:
mode:
authorChris Dyer <redpony@gmail.com>2010-02-01 17:38:39 -0500
committerChris Dyer <redpony@gmail.com>2010-02-01 17:38:39 -0500
commitc97b8a8b58f7385fb48b74e2cf1ea9610cd1202f (patch)
tree3bc1b02c39927a810862136534d5a0e35d7ed4fc /word-aligner/extract_weights.pl
parentda222df300e4f87ad185a7decbf119ad56aa34e0 (diff)
word aligner cleanup, new features
Diffstat (limited to 'word-aligner/extract_weights.pl')
-rwxr-xr-xword-aligner/extract_weights.pl17
1 files changed, 0 insertions, 17 deletions
diff --git a/word-aligner/extract_weights.pl b/word-aligner/extract_weights.pl
deleted file mode 100755
index dfedd12e..00000000
--- a/word-aligner/extract_weights.pl
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/usr/bin/perl -w
-use strict;
-my %dict=();
-while(<>) {
- chomp;
- my ($dummy, $a, $b, $wts) = split / \|\|\| /;
- my @weights = split /\s+/, $wts;
- for my $w (@weights) {
- my ($name, $val) = split /=/, $w;
- unless ($dict{$name}) {
- my $r = (0.5 - rand) / 5;
- $r = sprintf ("%0.4f", $r);
- print "$name $r\n";
- $dict{$name}= 1;
- }
- }
-}