private Automaton substitutionsOf(String s){
  List<Automaton> list=new ArrayList<>();
  for (int i=0; i < s.length(); i++) {
    Automaton a=Automata.makeString(s.substring(0,i));
    a=Operations.concatenate(a,Automata.makeAnyChar());
    a=Operations.concatenate(a,Automata.makeString(s.substring(i + 1)));
    list.add(a);
  }
  Automaton a=Operations.union(list);
  a=MinimizationOperations.minimize(a,DEFAULT_MAX_DETERMINIZED_STATES);
  return a;
}

private Automaton substitutionsOf ( String s ) { List < Automaton > list = new ArrayList < > ( ) ; for ( int i = 0 ; i < s . length ( ) ; i ++ ) { Automaton a = Automata . makeString ( s . substring ( 0 , i ) ) ; a = Operations . concatenate ( a , Automata . makeAnyChar ( ) ) ; a = Operations . concatenate ( a , Automata . makeString ( s . substring ( i + 1 ) ) ) ; list . add ( a ) ; } Automaton a = Operations . union ( list ) ; a = MinimizationOperations . minimize ( a , DEFAULT_MAX_DETERMINIZED_STATES ) ; return a ; }
return an automaton that accepts all 1 - character substitutions of s ( replacing one character )
