diff options
author | Patrick Simianer <simianer@cl.uni-heidelberg.de> | 2013-02-18 18:31:23 +0100 |
---|---|---|
committer | Patrick Simianer <simianer@cl.uni-heidelberg.de> | 2013-02-18 18:31:23 +0100 |
commit | 12f2eab0e7dc7167af47cddf8ef88968656277da (patch) | |
tree | 28953cc5de058908056b319222afc60d1efb6660 /training/crf/baum_welch_example/random_init.pl | |
parent | f051e98fb35c4ce69e489ef6550840bd6cd617fd (diff) | |
parent | 95c364f2cb002241c4a62bedb1c5ef6f1e9a7f22 (diff) |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'training/crf/baum_welch_example/random_init.pl')
-rwxr-xr-x | training/crf/baum_welch_example/random_init.pl | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/training/crf/baum_welch_example/random_init.pl b/training/crf/baum_welch_example/random_init.pl new file mode 100755 index 00000000..98467ed1 --- /dev/null +++ b/training/crf/baum_welch_example/random_init.pl @@ -0,0 +1,9 @@ +#!/usr/bin/perl -w +while(<>) { + chomp; + my ($a,$b,@d) =split /\s+/; + die "Bad input" if scalar @d > 0; + $r = -rand() * rand() - 0.5; + $r = 0 if $a =~ /^Uni:/; + print "$a $r\n"; +} |