public void callback(String word, int level) {
    if (word == null) return;
    int maxidx = word.length();
    int lastStart = -1;
    int i = 0;

    while (i < maxidx) {
      char c = word.charAt(i);
      if (Character.isLetter(c) == true) {
        if (lastStart == -1) {
          lastStart = i;
        }
      } else {
        if (lastStart != -1 && i > lastStart) {
          backend.callback(word.substring(lastStart, i), level);
          lastStart = -1;
        }
      }
      ++i;
    }
  }