question: private String mosesize ( String feature ) { if ( joshuaConfiguration . moses ) { if ( feature . startsWith ( "tm_" ) || feature . startsWith ( "lm_" ) ) return feature . replace ( "_" , "-" ) ; } return feature ; }
target:  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.