forked from bluemapleman/jieba-analysis
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
因为性能问题,暂时去除词性标注,希望有更好的 pull request 可以提供该功能
- Loading branch information
1 parent
6954ee6
commit be099cb
Showing
5 changed files
with
50 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,23 @@ | ||
package com.huaban.analysis.jieba; | ||
|
||
import org.apache.commons.lang3.StringUtils; | ||
|
||
public class SegToken { | ||
public Word word; | ||
public String word; | ||
|
||
public int startOffset; | ||
|
||
public int endOffset; | ||
|
||
|
||
public SegToken(Word word, int startOffset, int endOffset) { | ||
public SegToken(String word, int startOffset, int endOffset) { | ||
this.word = word; | ||
this.startOffset = startOffset; | ||
this.endOffset = endOffset; | ||
} | ||
|
||
|
||
@Override | ||
public String toString() { | ||
if (StringUtils.isBlank(this.word.getTokenType())) | ||
return "[" + this.word.getToken() + ", " + startOffset + ", " + endOffset + "]"; | ||
else | ||
return "[" + this.word.getToken() + ", " + startOffset + ", " + endOffset + ", " + this.word.getTokenType() + "]"; | ||
return "[" + word + ", " + startOffset + ", " + endOffset + "]"; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters