public double predict_char_prob(String pre,int n){
  if (n < 0 || n > predicted_chars) {
    return 0;
  }
  if (pre.equals(" ")) {
    pre="<w>";
  }
  String key=pre + n;
  Double prob=context_prob.get(key);
  if (prob != null) {
    prob=Math.pow(10,prob);
  }
  return prob;
}

public double predict_char_prob ( String pre , int n ) { if ( n < 0 || n > predicted_chars ) { return 0 ; } if ( pre . equals ( " " ) ) { pre = "<w>" ; } String key = pre + n ; Double prob = context_prob . get ( key ) ; if ( prob != null ) { prob = Math . pow ( 10 , prob ) ; } return prob ; }
method which returns the probability of the nth most likely character , given a preceeding character ( pre ) . use in combination with the predict_char methods .
