test_class.file: 10000sentencesapp/src/test/java/info/puzz/a10000sentences/utils/WordChunkUtilsTest.java
test_class.identifier: WordChunkUtilsTest
test_case.body: @Test
      public void testRomanianWithDash() {
          String sentence = "L-a trezit.";
          List<WordChunk> chunks = WordChunkUtils.getWordChunks(sentence);
          Assert.assertEquals(2, chunks.size());
          Assert.assertEquals("L-a", chunks.get(0).word);
          Assert.assertEquals("trezit", chunks.get(1).word);
      }
test_case.class_method_signature: WordChunkUtilsTest.testRomanianWithDash()
test_case.full_signature: @Test public void testRomanianWithDash()
test_case.identifier: testRomanianWithDash
test_case.invocations: getWordChunks assertEquals size assertEquals get assertEquals get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testRomanianWithDash()
focal_class.declarator: SENTENCE_ENDING_INTERPUNCTIONS = ".?!"
focal_class.modifier: private static final
focal_class.original_string: private static final String SENTENCE_ENDING_INTERPUNCTIONS = ".?!";
focal_class.type: String
focal_class.var_name: SENTENCE_ENDING_INTERPUNCTIONS
focal_class.file: 10000sentencesapp/src/main/java/info/puzz/a10000sentences/utils/WordChunkUtils.java
focal_class.identifier: WordChunkUtils
focal_class.class_method_signature: WordChunkUtils.WordChunkUtils()
focal_class.full_signature: private  WordChunkUtils()
focal_class.identifier: WordChunkUtils
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  WordChunkUtils()
focal_class.class_method_signature: WordChunkUtils.getWordChunks(String string)
focal_class.full_signature: public static List<WordChunk> getWordChunks(String string)
focal_class.identifier: getWordChunks
focal_class.modifiers: public static
focal_class.parameters: (String string)
focal_class.return: List<WordChunk>
focal_class.signature: List<WordChunk> getWordChunks(String string)
focal_class.class_method_signature: WordChunkUtils.getWord(String str)
focal_class.full_signature: public static String getWord(String str)
focal_class.identifier: getWord
focal_class.modifiers: public static
focal_class.parameters: (String str)
focal_class.return: String
focal_class.signature: String getWord(String str)
focal_class.class_method_signature: WordChunkUtils.main(String[] args)
focal_class.full_signature: public static void main(String[] args)
focal_class.identifier: main
focal_class.modifiers: public static
focal_class.parameters: (String[] args)
focal_class.return: void
focal_class.signature: void main(String[] args)
focal_method.body: public static List<WordChunk> getWordChunks(String string) {
          string = string.replaceAll("\\s+", " ");
  
          for (char c : SENTENCE_ENDING_INTERPUNCTIONS.toCharArray()) {
              string = string.replace(" " + c, "" + c);
          }
  
          ArrayList<WordChunk> res = new ArrayList<>();
          String[] parts = string.split("\\s+");
  
          for (int i = 0; i < parts.length; i++) {
              String part = parts[i];
              String word = getWord(part);
              if (res.size() > 0 && StringUtils.isEmpty(word)) {
                  res.get(res.size() - 1).chunk += " " + part;
              } else {
                  res.add(new WordChunk(part, word));
              }
          }
  
          WordChunk firstChunk = res.get(0);
          if (res.size() > 1 && StringUtils.isEmpty(firstChunk.word)) {
              res.remove(0);
              res.get(0).chunk = firstChunk.chunk + " " + res.get(0).chunk;
          }
  
          return res;
      }
focal_method.class_method_signature: WordChunkUtils.getWordChunks(String string)
focal_method.full_signature: public static List<WordChunk> getWordChunks(String string)
focal_method.identifier: getWordChunks
focal_method.invocations: replaceAll toCharArray replace split getWord size isEmpty get size add get size isEmpty remove get get
focal_method.modifiers: public static
focal_method.parameters: (String string)
focal_method.return: List<WordChunk>
focal_method.signature: List<WordChunk> getWordChunks(String string)