Skip to content

Instantly share code, notes, and snippets.

@dainiusjocas
Created June 22, 2015 13:21
Show Gist options
  • Save dainiusjocas/6ecbe8ef0ce6dcd5cf11 to your computer and use it in GitHub Desktop.
Save dainiusjocas/6ecbe8ef0ce6dcd5cf11 to your computer and use it in GitHub Desktop.
snowball stemmer clojure
/*
* This fixes some strance method overloading error:
* NoSuchMethodError org.tartarus.snowball.ext.LithuanianStemmer.slice_from(Ljava/lang/CharSequence;)V
*/
protected void slice_from(String cs) {
super.slice_check();
String current = super.getCurrent();
StringBuilder sb = new StringBuilder(current);
sb.replace(this.bra, this.ket, cs);
this.setCurrent(sb.toString());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment