private static boolean checkSentence(String[] s1,String[] s2){
  int n1=0, n2=0;
  for (  String word : s1) {
    n1+=word.split("_").length;
  }
  for (  String word : s2) {
    n2+=word.split("_").length;
  }
  return n1 == n2;
}

private static boolean checkSentence ( String [ ] s1 , String [ ] s2 ) { int n1 = 0 , n2 = 0 ; for ( String word : s1 ) { n1 += word . split ( "_" ) . length ; } for ( String word : s2 ) { n2 += word . split ( "_" ) . length ; } return n1 == n2 ; }
checks the length of two sentence measured in syllables .
