Navigation Menu

Skip to content

Commit

Permalink
fix bug for issue #11
Browse files Browse the repository at this point in the history
  • Loading branch information
yizhiru committed Nov 15, 2018
1 parent 5b6bddb commit 137c022
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -15,7 +15,7 @@ thulac4j是[THULAC](http://thulac.thunlp.org/)的高效Java 8实现,具有分
<dependency>
<groupId>io.github.yizhiru</groupId>
<artifactId>thulac4j</artifactId>
<version>3.1.1</version>
<version>3.1.2</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -9,7 +9,7 @@

<groupId>io.github.yizhiru</groupId>
<artifactId>thulac4j</artifactId>
<version>3.1.1</version>
<version>3.1.2</version>
<packaging>jar</packaging>

<name>thulac4j</name>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/github/yizhiru/thulac4j/POSTagger.java
Expand Up @@ -25,7 +25,7 @@ public POSTagger(String weightPath, String featurePath) throws IOException {
* @param text 输入句子
* @return 词与词性结对结果
*/
List<TokenItem> tagging(String text) {
public List<TokenItem> tagging(String text) {
return tokenize(text);
}
}
Expand Up @@ -90,11 +90,11 @@ public void restore() throws IOException {
};

for (int i = 0; i < binPaths.length; i++) {
DoubleArrayTrie stop = DoubleArrayTrie.loadDat(binPaths[i]);
DoubleArrayTrie dat = DoubleArrayTrie.loadDat(binPaths[i]);
Set<String> dict = Files.lines(Paths.get(dictPaths[i]))
.map(String::trim)
.collect(Collectors.toSet());
List<String> words = DoubleArrayTrie.restore(stop);
List<String> words = DoubleArrayTrie.restore(dat);
for (String word : words) {
assertTrue(dict.contains(word));
}
Expand Down

0 comments on commit 137c022

Please sign in to comment.