Skip to content

Commit

Permalink
İçinde tire geçen kelimeler için geçici düzeltme #14
Browse files Browse the repository at this point in the history
  • Loading branch information
okanozdemir committed Nov 7, 2018
1 parent b29fb74 commit 9e89456
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ public static ZemberekSpellCheck getInstance() {
}

public boolean isCorrect(String w) {
int indexOfDash = w.indexOf("-");
if (indexOfDash != -1) {
String w1 = w.substring(0, indexOfDash);
String w2 = w.substring(indexOfDash + 1);
if (spellChecker.check(w1) && spellChecker.check(w2)) {
return true;
}
}
return spellChecker.check(removePunctuation(w));
}

Expand Down

0 comments on commit 9e89456

Please sign in to comment.