@Test public void testPreProcessConvertsDollarB() throws PreProcessingException { assertEquals("Convert dollar-b", "beta-bromo", PreProcessor.preProcess("$b-bromo")); }
static String preProcess(String chemicalName) throws PreProcessingException { chemicalName = chemicalName.trim(); if (chemicalName.length() == 0){ throw new PreProcessingException("Input chemical name was blank!"); } chemicalName = performMultiCharacterReplacements(chemicalName); chemicalName = StringTools.convertNonAsciiAndNormaliseRepresentation(chemicalName); return chemicalName; }
PreProcessor { static String preProcess(String chemicalName) throws PreProcessingException { chemicalName = chemicalName.trim(); if (chemicalName.length() == 0){ throw new PreProcessingException("Input chemical name was blank!"); } chemicalName = performMultiCharacterReplacements(chemicalName); chemicalName = StringTools.convertNonAsciiAndNormaliseRepresentation(chemicalName); return chemicalName; } }
PreProcessor { static String preProcess(String chemicalName) throws PreProcessingException { chemicalName = chemicalName.trim(); if (chemicalName.length() == 0){ throw new PreProcessingException("Input chemical name was blank!"); } chemicalName = performMultiCharacterReplacements(chemicalName); chemicalName = StringTools.convertNonAsciiAndNormaliseRepresentation(chemicalName); return chemicalName; }  }
PreProcessor { static String preProcess(String chemicalName) throws PreProcessingException { chemicalName = chemicalName.trim(); if (chemicalName.length() == 0){ throw new PreProcessingException("Input chemical name was blank!"); } chemicalName = performMultiCharacterReplacements(chemicalName); chemicalName = StringTools.convertNonAsciiAndNormaliseRepresentation(chemicalName); return chemicalName; }   }
PreProcessor { static String preProcess(String chemicalName) throws PreProcessingException { chemicalName = chemicalName.trim(); if (chemicalName.length() == 0){ throw new PreProcessingException("Input chemical name was blank!"); } chemicalName = performMultiCharacterReplacements(chemicalName); chemicalName = StringTools.convertNonAsciiAndNormaliseRepresentation(chemicalName); return chemicalName; }    }