Skip to content

Commit

Permalink
upgrade es to 6.2.4,hanlp to 1.6.4
Browse files Browse the repository at this point in the history
Signed-off-by: Ranger Tsao <[email protected]>
  • Loading branch information
boliza committed Jun 20, 2018
1 parent 364a68b commit 6e611e5
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 6 deletions.
9 changes: 5 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
buildscript {
ext {
elasticserachVersion = '6.2.3'
hanlpVersion = '1.5.3'
elasticserachVersion = '6.2.4'
hanlpVersion = '1.6.4'
}

repositories {
mavenLocal()
maven { url = 'http://maven.aliyun.com/nexus/content/groups/public/' }
mavenCentral()
jcenter()
}
Expand All @@ -16,7 +17,7 @@ buildscript {
}

group = 'io.shike'
version = '6.2.3'
version = '6.2.4'

repositories {
mavenLocal()
Expand Down Expand Up @@ -61,7 +62,7 @@ bundlePlugin {

task mvn(type: Exec) {
workingDir 'libs'
commandLine 'mvn', 'install:install-file', '-Dfile=hanlp-$hanlpVersion.jar', '-DgroupId=com.hankcs', '-DartifactId=hanlp','-Dversion=1.5.3', '-Dpackaging=jar'
commandLine 'mvn', 'install:install-file', '-Dfile=hanlp-1.6.4.jar', '-DgroupId=com.hankcs', '-DartifactId=hanlp','-Dversion=1.6.4', '-Dpackaging=jar'
doLast {
println('Installed hanlp')
}
Expand Down
11 changes: 10 additions & 1 deletion config/hanlp.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#本配置文件中的路径的根目录,根目录+其他路径=完整路径(支持相对路径,请参考:https://github.com/hankcs/HanLP/pull/254)
#Windows用户请注意,路径分隔符统一使用/
root = /${data.root}
root = ${data root}
#核心词典路径
CoreDictionaryPath = data/dictionary/CoreNatureDictionary.txt
#2元语法词典路径
Expand All @@ -27,3 +27,12 @@ ShowTermNature = true
#IO适配器,实现com.hankcs.hanlp.corpus.io.IIOAdapter接口以在不同的平台(Hadoop、Redis等)上运行HanLP
#默认的IO适配器如下,该适配器是基于普通文件系统的。
#IOAdapter=com.hankcs.hanlp.corpus.io.FileIOAdapter
#感知机词法分析器
PerceptronCWSModelPath = data/model/perceptron/pku199801/cws.bin
PerceptronPOSModelPath = data/model/perceptron/pku199801/pos.bin
PerceptronNERModelPath = data/model/perceptron/pku199801/ner.bin
#CRF词法分析器
CRFCWSModelPath = data/model/crf/pku199801/cws.bin
CRFPOSModelPath = data/model/crf/pku199801/pos.bin
CRFNERModelPath = data/model/crf/pku199801/ner.bin
#更多配置项请参考 https://github.com/hankcs/HanLP/blob/master/src/main/java/com/hankcs/hanlp/HanLP.java#L59 自行添加
Binary file not shown.
Binary file renamed libs/hanlp-1.5.3.jar → libs/hanlp-1.6.4.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public static HanLPTokenizerFactory createNLP(IndexSettings indexSettings, Envir
return new HanLPTokenizerFactory(indexSettings, environment, name, settings) {
@Override
public Tokenizer create() {
return new HanLPTokenizer(NLPTokenizer.SEGMENT, defaultStopWordDictionary, enablePorterStemming);
return new HanLPTokenizer(NLPTokenizer.ANALYZER, defaultStopWordDictionary, enablePorterStemming);
}
};
}
Expand Down

0 comments on commit 6e611e5

Please sign in to comment.