diff --git a/src/main/java/io/bdrc/lucene/bo/TibWordTokenizer.java b/src/main/java/io/bdrc/lucene/bo/TibWordTokenizer.java index 15d7a0f..5203c28 100644 --- a/src/main/java/io/bdrc/lucene/bo/TibWordTokenizer.java +++ b/src/main/java/io/bdrc/lucene/bo/TibWordTokenizer.java @@ -83,7 +83,7 @@ public TibWordTokenizer(String filename) throws FileNotFoundException, IOExcepti */ public TibWordTokenizer() throws FileNotFoundException, IOException { InputStream stream = null; - stream = TibWordTokenizer.class.getResourceAsStream("total_lexicon.txt"); + stream = TibWordTokenizer.class.getResourceAsStream("/total_lexicon.txt"); if (stream == null) { // we're not using the jar, there is no resource, assuming we're running the code init(new FileReader("resource/output/total_lexicon.txt")); diff --git a/src/main/java/io/bdrc/lucene/bo/TibetanAnalyzer.java b/src/main/java/io/bdrc/lucene/bo/TibetanAnalyzer.java index 00e8034..d7689d7 100644 --- a/src/main/java/io/bdrc/lucene/bo/TibetanAnalyzer.java +++ b/src/main/java/io/bdrc/lucene/bo/TibetanAnalyzer.java @@ -76,7 +76,7 @@ public TibetanAnalyzer(boolean segmentInWords, boolean lemmatize, boolean filter if (stopFilename != null) { if (stopFilename.isEmpty()) { InputStream stream = null; - stream = TibetanAnalyzer.class.getResourceAsStream("bo-stopwords.txt"); + stream = TibetanAnalyzer.class.getResourceAsStream("/bo-stopwords.txt"); if (stream == null) { // we're not using the jar, there is no resource, assuming we're running the code this.tibStopSet = null; } else {