private String mosesize(String feature){
  if (joshuaConfiguration.moses) {
    if (feature.startsWith("tm_") || feature.startsWith("lm_"))     return feature.replace("_","-");
  }
  return feature;
}

private String mosesize ( String feature ) { if ( joshuaConfiguration . moses ) { if ( feature . startsWith ( "tm_" ) || feature . startsWith ( "lm_" ) ) return feature . replace ( "_" , "-" ) ; } return feature ; }
moses requires the pattern . * _ . * for sparse features , and prohibits underscores in dense features . this conforms to that pattern . we assume non - conforming dense features start with tm_ or lm_ , and the only sparse feature that needs converting is oovpenalty .
