code: private static boolean shouldDehyphenate(String w1, String w2) {
  
          boolean dehyphenate = true;
          String rule = "DH"; // choice by default, dehyphenate
  
          if (w1.length() <= 1) {
              // w1 has only one char
              dehyphenate = false;
              rule = "N11";
          } else if (w2.length() <= 1) {
              // w2 has only one char
              dehyphenate = false;
              rule = "N12";
          } else if (numberEnd.matcher(w1).find()) {
              // number at the end of w1
              dehyphenate = false;
              rule = "N21";
          } else if (numberStart.matcher(w2).find()) {
              // number at the beginning of w2
              dehyphenate = false;
              rule = "N22";
          } else if (greekEnd.matcher(w1).find()) {
              // greek letter at the end of w1
              dehyphenate = false;
              rule = "N31";
          } else if (greekStart.matcher(w2).find()) {
              // greek letter at the beginning of w2
              dehyphenate = false;
              rule = "N32";
          }
  
          if (dehyphenate) {
              String word = w1.substring(0, w1.length() - 1) + w2;
              LOG.debug("\"" + w1 + "\",\"" + w2 + "\",\"" + rule + "\",\""
                      + word + "\"\n");
          } else {
              LOG.debug("\"" + w1 + "\",\"" + w2 + "\",\"" + rule + "\",\"" + w1
                      + w2 + "\"\n");
          }
          return dehyphenate;
      }
docs: Decides whether a word should be dehyphenated
  
  @param w1
  word behind
  @param w2
  word forward
  @return returns true if the word should be dehyphenated