private void addChatMatchSpecToRewardStructure ( ChatMatchSpec c ) { Float reward = c . getReward ( ) . floatValue ( ) ; Pattern pattern = Pattern . compile ( c . getRegex ( ) , Pattern . CASE_INSENSITIVE ) ; patternMap . put ( pattern , reward ) ; distributionMap . put ( pattern , c . getDistribution ( ) ) ; }
Helper function for adding a chat match specification to the pattern map .