public static String convertBracketsFromPTBFormat(String sentence){
  sentence=sentence.replaceAll("-LRB-","(");
  sentence=sentence.replaceAll("-RRB-",")");
  sentence=sentence.replaceAll("-LSB-","[");
  sentence=sentence.replaceAll("-RSB-","]");
  sentence=sentence.replaceAll("-LCB-","{");
  sentence=sentence.replaceAll("-RCB-","}");
  return sentence;
}

public static String convertBracketsFromPTBFormat ( String sentence ) { sentence = sentence . replaceAll ( "-LRB-" , "(" ) ; sentence = sentence . replaceAll ( "-RRB-" , ")" ) ; sentence = sentence . replaceAll ( "-LSB-" , "[" ) ; sentence = sentence . replaceAll ( "-RSB-" , "]" ) ; sentence = sentence . replaceAll ( "-LCB-" , "{" ) ; sentence = sentence . replaceAll ( "-RCB-" , "}" ) ; return sentence ; }
convert brackets from the penn treebank format ( which uses strings like - lrb - , - rrb - , etc to denote ' ( ' , ' ) ' , etc . ) to readable tokens .
