Skip to content

Commit

Permalink
---------------------------------------
Browse files Browse the repository at this point in the history
  • Loading branch information
jimichan committed Jun 26, 2023
1 parent 5c91be2 commit cf40957
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {

description = "mynlp是mayabot开源的中文自然语言处理工具集"

val buildVersion = "4.1.0-beta8"
val buildVersion = "4.1.0-beta10"
//val buildVersion = "4.0.1-local"
val snapShot = false

Expand Down
Binary file added doc/mynlp.docx
Binary file not shown.
2 changes: 1 addition & 1 deletion mynlp-all/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dependencies {
// pinyin
implementation("com.mayabot.mynlp.resource:mynlp-resource-pinyin:1.1.0")
// 繁简体转换
implementation("com.mayabot.mynlp.resource:mynlp-resource-transform:1.0.0")
implementation("com.mayabot.mynlp.resource:mynlp-resource-transform:1.0.1")


// 感知机分词模型
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ public StopwordFilter(LexerReader source, StopWordDict stopWord) {
this.stopWords = Arrays.asList(stopWord);
}


/**
* 使用指定的停用词词典,和系统自带的通用词无关
*
* @param source
* @param stopWords
*/
public StopwordFilter(LexerReader source, List<StopWordDict> stopWords) {
super(source);
ArrayList list = new ArrayList();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ open class InternDataHandler(val parser: DataParser, val args: Args) : DataHandl
val sep = Pattern.compile("[\t ]")

examples =
fileName.toFile().lines().parallel().map { parser.parse(it, sep) }.filter({ it != null }).collect(toList())
fileName.toFile().lines().parallel().map { parser.parse(it, sep) }.filter { it != null }.collect(toList())

println("Total number of examples loaded : " + examples.size)
size = examples.size
Expand Down

0 comments on commit cf40957

Please sign in to comment.