Blame view

egs/callhome_egyptian/s5/local/ctm.sh 1014 Bytes
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
  #!/usr/bin/env bash
  
  . ./cmd.sh
  
  split=dev
  data_dir=data/dev
  decode_dir=exp/sgmm2x_6a/decode_dev/
  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