Blame view

egs/fisher_callhome_spanish/s5/local/ctm.sh 1.05 KB
8dcb6dfcb   Yannick Estève   first commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
  #!/usr/bin/env bash
  # Copyright 2014  Gaurav Kumar.   Apache 2.0
  
  . ./cmd.sh
  
  split=test
  data_dir=data/test
  decode_dir=exp/sgmm2x_6a_mmi_b0.2/decode_test_fmllr_it4/
  lang_dir=data/lang
  
  # Create the STM file
  # Always create this file before creating the CTM files so that
  # channel numbers are properly created.
  if [ ! -f $data_dir/stm ]; then
      /export/a11/guoguo/babel/103-bengali-limitedLP.official/local/prepare_stm.pl $data_dir
  fi
  
  # Create the CTM file
  steps/get_ctm.sh $data_dir $lang_dir $decode_dir
  
  # Make sure that channel markers match
  #perl -i -pe "s:\s.*_fsp-([AB]): \1:g" data/dev/stm
  #ls exp/tri5a/decode_dev/score_*/dev.ctm | xargs -I {} perl -i -pe 's:fsp\s1\s:fsp A :g' {}
  #ls exp/tri5a/decode_dev/score_*/dev.ctm | xargs -I {} perl -i -pe 's:fsp\s2\s:fsp B :g' {}
  
  # Get the environment variables
  . /export/babel/data/software/env.sh
  
  # Start scoring
  /export/a11/guoguo/babel/103-bengali-limitedLP.official/local/score_stm.sh $data_dir $lang_dir \
      $decode_dir
  
  # Print a summary of the result
  grep "Percent Total Error" $decode_dir/score_*/$split.ctm.dtl