Skip to content

Commit 0c8992f

Browse files
committed
Update lucene version to 8.3.0
1 parent 356d9d9 commit 0c8992f

24 files changed

+222
-225
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ ik-analyzer for solr 7.x-8.x
3030

3131

3232
## 使用说明
33-
* jar包下载地址:[![GitHub version](https://img.shields.io/badge/version-8.2.0-519dd9.svg)](https://search.maven.org/remotecontent?filepath=com/github/magese/ik-analyzer/8.2.0/ik-analyzer-8.2.0.jar)
33+
* jar包下载地址:[![GitHub version](https://img.shields.io/badge/version-8.3.0-519dd9.svg)](https://search.maven.org/remotecontent?filepath=com/github/magese/ik-analyzer/8.3.0/ik-analyzer-8.3.0.jar)
3434
* 历史版本:[![GitHub version](https://img.shields.io/maven-central/v/com.github.magese/ik-analyzer.svg?style=flat-square)](https://search.maven.org/search?q=g:com.github.magese%20AND%20a:ik-analyzer&core=gav)
3535

3636
```console
3737
<!-- Maven仓库地址 -->
3838
<dependency>
3939
<groupId>com.github.magese</groupId>
4040
<artifactId>ik-analyzer</artifactId>
41-
<version>8.2.0</version>
41+
<version>8.3.0</version>
4242
</dependency>
4343
```
4444

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>com.github.magese</groupId>
66
<artifactId>ik-analyzer</artifactId>
7-
<version>8.2.0</version>
7+
<version>8.3.0</version>
88
<packaging>jar</packaging>
99

1010
<name>ik-analyzer-solr</name>
@@ -13,7 +13,7 @@
1313

1414
<properties>
1515
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
16-
<lucene.version>8.2.0</lucene.version>
16+
<lucene.version>8.3.0</lucene.version>
1717
<javac.src.version>1.8</javac.src.version>
1818
<javac.target.version>1.8</javac.target.version>
1919
<maven.compiler.plugin.version>3.3</maven.compiler.plugin.version>

src/main/java/org/wltea/analyzer/core/AnalyzeContext.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* IK 中文分词 版本 8.2.0
3-
* IK Analyzer release 8.2.0
2+
* IK 中文分词 版本 8.3.0
3+
* IK Analyzer release 8.3.0
44
*
55
* Licensed to the Apache Software Foundation (ASF) under one or more
66
* contributor license agreements. See the NOTICE file distributed with
@@ -21,8 +21,8 @@
2121
* 版权声明 2012,乌龙茶工作室
2222
* provided by Linliangyi and copyright 2012 by Oolong studio
2323
*
24-
* 8.2.0版本 由 Magese (magese@live.cn) 更新
25-
* release 8.2.0 update by Magese(magese@live.cn)
24+
* 8.3.0版本 由 Magese (magese@live.cn) 更新
25+
* release 8.3.0 update by Magese(magese@live.cn)
2626
*
2727
*/
2828
package org.wltea.analyzer.core;

src/main/java/org/wltea/analyzer/core/CJKSegmenter.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* IK 中文分词 版本 8.2.0
3-
* IK Analyzer release 8.2.0
2+
* IK 中文分词 版本 8.3.0
3+
* IK Analyzer release 8.3.0
44
*
55
* Licensed to the Apache Software Foundation (ASF) under one or more
66
* contributor license agreements. See the NOTICE file distributed with
@@ -21,8 +21,8 @@
2121
* 版权声明 2012,乌龙茶工作室
2222
* provided by Linliangyi and copyright 2012 by Oolong studio
2323
*
24-
* 8.2.0版本 由 Magese (magese@live.cn) 更新
25-
* release 8.2.0 update by Magese(magese@live.cn)
24+
* 8.3.0版本 由 Magese (magese@live.cn) 更新
25+
* release 8.3.0 update by Magese(magese@live.cn)
2626
*
2727
*/
2828
package org.wltea.analyzer.core;

src/main/java/org/wltea/analyzer/core/CN_QuantifierSegmenter.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* IK 中文分词 版本 8.2.0
3-
* IK Analyzer release 8.2.0
2+
* IK 中文分词 版本 8.3.0
3+
* IK Analyzer release 8.3.0
44
*
55
* Licensed to the Apache Software Foundation (ASF) under one or more
66
* contributor license agreements. See the NOTICE file distributed with
@@ -21,8 +21,8 @@
2121
* 版权声明 2012,乌龙茶工作室
2222
* provided by Linliangyi and copyright 2012 by Oolong studio
2323
*
24-
* 8.2.0版本 由 Magese (magese@live.cn) 更新
25-
* release 8.2.0 update by Magese(magese@live.cn)
24+
* 8.3.0版本 由 Magese (magese@live.cn) 更新
25+
* release 8.3.0 update by Magese(magese@live.cn)
2626
*
2727
*/
2828
package org.wltea.analyzer.core;

src/main/java/org/wltea/analyzer/core/CharacterUtil.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* IK 中文分词 版本 8.2.0
3-
* IK Analyzer release 8.2.0
2+
* IK 中文分词 版本 8.3.0
3+
* IK Analyzer release 8.3.0
44
*
55
* Licensed to the Apache Software Foundation (ASF) under one or more
66
* contributor license agreements. See the NOTICE file distributed with
@@ -21,8 +21,8 @@
2121
* 版权声明 2012,乌龙茶工作室
2222
* provided by Linliangyi and copyright 2012 by Oolong studio
2323
*
24-
* 8.2.0版本 由 Magese (magese@live.cn) 更新
25-
* release 8.2.0 update by Magese(magese@live.cn)
24+
* 8.3.0版本 由 Magese (magese@live.cn) 更新
25+
* release 8.3.0 update by Magese(magese@live.cn)
2626
*
2727
*/
2828
package org.wltea.analyzer.core;

src/main/java/org/wltea/analyzer/core/IKArbitrator.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* IK 中文分词 版本 8.2.0
3-
* IK Analyzer release 8.2.0
2+
* IK 中文分词 版本 8.3.0
3+
* IK Analyzer release 8.3.0
44
*
55
* Licensed to the Apache Software Foundation (ASF) under one or more
66
* contributor license agreements. See the NOTICE file distributed with
@@ -21,8 +21,8 @@
2121
* 版权声明 2012,乌龙茶工作室
2222
* provided by Linliangyi and copyright 2012 by Oolong studio
2323
*
24-
* 8.2.0版本 由 Magese (magese@live.cn) 更新
25-
* release 8.2.0 update by Magese(magese@live.cn)
24+
* 8.3.0版本 由 Magese (magese@live.cn) 更新
25+
* release 8.3.0 update by Magese(magese@live.cn)
2626
*
2727
*/
2828
package org.wltea.analyzer.core;

src/main/java/org/wltea/analyzer/core/IKSegmenter.java

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* IK 中文分词 版本 8.2.0
3-
* IK Analyzer release 8.2.0
2+
* IK 中文分词 版本 8.3.0
3+
* IK Analyzer release 8.3.0
44
*
55
* Licensed to the Apache Software Foundation (ASF) under one or more
66
* contributor license agreements. See the NOTICE file distributed with
@@ -21,21 +21,21 @@
2121
* 版权声明 2012,乌龙茶工作室
2222
* provided by Linliangyi and copyright 2012 by Oolong studio
2323
*
24-
* 8.2.0版本 由 Magese (magese@live.cn) 更新
25-
* release 8.2.0 update by Magese(magese@live.cn)
24+
* 8.3.0版本 由 Magese (magese@live.cn) 更新
25+
* release 8.3.0 update by Magese(magese@live.cn)
2626
*
2727
*/
2828
package org.wltea.analyzer.core;
2929

30+
import org.wltea.analyzer.cfg.Configuration;
31+
import org.wltea.analyzer.cfg.DefaultConfig;
32+
import org.wltea.analyzer.dic.Dictionary;
33+
3034
import java.io.IOException;
3135
import java.io.Reader;
3236
import java.util.ArrayList;
3337
import java.util.List;
3438

35-
import org.wltea.analyzer.cfg.Configuration;
36-
import org.wltea.analyzer.cfg.DefaultConfig;
37-
import org.wltea.analyzer.dic.Dictionary;
38-
3939
/**
4040
* IK分词器主类
4141
*/
@@ -58,7 +58,6 @@ public final class IKSegmenter {
5858
*
5959
* @param input 读取流
6060
* @param useSmart 为true,使用智能分词策略
61-
* <p>
6261
* 非智能分词:细粒度输出所有可能的切分结果
6362
* 智能分词: 合并数词和量词,对分词结果进行歧义判断
6463
*/

src/main/java/org/wltea/analyzer/core/ISegmenter.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* IK 中文分词 版本 8.2.0
3-
* IK Analyzer release 8.2.0
2+
* IK 中文分词 版本 8.3.0
3+
* IK Analyzer release 8.3.0
44
*
55
* Licensed to the Apache Software Foundation (ASF) under one or more
66
* contributor license agreements. See the NOTICE file distributed with
@@ -21,8 +21,8 @@
2121
* 版权声明 2012,乌龙茶工作室
2222
* provided by Linliangyi and copyright 2012 by Oolong studio
2323
*
24-
* 8.2.0版本 由 Magese (magese@live.cn) 更新
25-
* release 8.2.0 update by Magese(magese@live.cn)
24+
* 8.3.0版本 由 Magese (magese@live.cn) 更新
25+
* release 8.3.0 update by Magese(magese@live.cn)
2626
*
2727
*/
2828
package org.wltea.analyzer.core;

src/main/java/org/wltea/analyzer/core/LetterSegmenter.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* IK 中文分词 版本 8.2.0
3-
* IK Analyzer release 8.2.0
2+
* IK 中文分词 版本 8.3.0
3+
* IK Analyzer release 8.3.0
44
*
55
* Licensed to the Apache Software Foundation (ASF) under one or more
66
* contributor license agreements. See the NOTICE file distributed with
@@ -21,8 +21,8 @@
2121
* 版权声明 2012,乌龙茶工作室
2222
* provided by Linliangyi and copyright 2012 by Oolong studio
2323
*
24-
* 8.2.0版本 由 Magese (magese@live.cn) 更新
25-
* release 8.2.0 update by Magese(magese@live.cn)
24+
* 8.3.0版本 由 Magese (magese@live.cn) 更新
25+
* release 8.3.0 update by Magese(magese@live.cn)
2626
*
2727
*/
2828
package org.wltea.analyzer.core;

src/main/java/org/wltea/analyzer/core/Lexeme.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* IK 中文分词 版本 8.2.0
3-
* IK Analyzer release 8.2.0
2+
* IK 中文分词 版本 8.3.0
3+
* IK Analyzer release 8.3.0
44
*
55
* Licensed to the Apache Software Foundation (ASF) under one or more
66
* contributor license agreements. See the NOTICE file distributed with
@@ -21,8 +21,8 @@
2121
* 版权声明 2012,乌龙茶工作室
2222
* provided by Linliangyi and copyright 2012 by Oolong studio
2323
*
24-
* 8.2.0版本 由 Magese (magese@live.cn) 更新
25-
* release 8.2.0 update by Magese(magese@live.cn)
24+
* 8.3.0版本 由 Magese (magese@live.cn) 更新
25+
* release 8.3.0 update by Magese(magese@live.cn)
2626
*
2727
*/
2828
package org.wltea.analyzer.core;

src/main/java/org/wltea/analyzer/core/LexemePath.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* IK 中文分词 版本 8.2.0
3-
* IK Analyzer release 8.2.0
2+
* IK 中文分词 版本 8.3.0
3+
* IK Analyzer release 8.3.0
44
*
55
* Licensed to the Apache Software Foundation (ASF) under one or more
66
* contributor license agreements. See the NOTICE file distributed with
@@ -21,8 +21,8 @@
2121
* 版权声明 2012,乌龙茶工作室
2222
* provided by Linliangyi and copyright 2012 by Oolong studio
2323
*
24-
* 8.2.0版本 由 Magese (magese@live.cn) 更新
25-
* release 8.2.0 update by Magese(magese@live.cn)
24+
* 8.3.0版本 由 Magese (magese@live.cn) 更新
25+
* release 8.3.0 update by Magese(magese@live.cn)
2626
*
2727
*/
2828
package org.wltea.analyzer.core;

src/main/java/org/wltea/analyzer/core/QuickSortSet.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* IK 中文分词 版本 8.2.0
2+
* IK 中文分词 版本 8.3.0
33
* IK Analyzer release 8.2.0
44
*
55
* Licensed to the Apache Software Foundation (ASF) under one or more

src/main/java/org/wltea/analyzer/dic/DictSegment.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* IK 中文分词 版本 8.2.0
3-
* IK Analyzer release 8.2.0
2+
* IK 中文分词 版本 8.3.0
3+
* IK Analyzer release 8.3.0
44
*
55
* Licensed to the Apache Software Foundation (ASF) under one or more
66
* contributor license agreements. See the NOTICE file distributed with
@@ -21,8 +21,8 @@
2121
* 版权声明 2012,乌龙茶工作室
2222
* provided by Linliangyi and copyright 2012 by Oolong studio
2323
*
24-
* 8.2.0版本 由 Magese (magese@live.cn) 更新
25-
* release 8.2.0 update by Magese(magese@live.cn)
24+
* 8.3.0版本 由 Magese (magese@live.cn) 更新
25+
* release 8.3.0 update by Magese(magese@live.cn)
2626
*
2727
*/
2828
package org.wltea.analyzer.dic;

src/main/java/org/wltea/analyzer/dic/Dictionary.java

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* IK 中文分词 版本 8.2.0
3-
* IK Analyzer release 8.2.0
2+
* IK 中文分词 版本 8.3.0
3+
* IK Analyzer release 8.3.0
44
*
55
* Licensed to the Apache Software Foundation (ASF) under one or more
66
* contributor license agreements. See the NOTICE file distributed with
@@ -21,8 +21,8 @@
2121
* 版权声明 2012,乌龙茶工作室
2222
* provided by Linliangyi and copyright 2012 by Oolong studio
2323
*
24-
* 8.2.0版本 由 Magese (magese@live.cn) 更新
25-
* release 8.2.0 update by Magese(magese@live.cn)
24+
* 8.3.0版本 由 Magese (magese@live.cn) 更新
25+
* release 8.3.0 update by Magese(magese@live.cn)
2626
*
2727
*/
2828
package org.wltea.analyzer.dic;
@@ -226,23 +226,25 @@ public boolean isStopWord(char[] charArray, int begin, int length) {
226226
private void loadMainDict() {
227227
// 建立一个主词典实例
228228
_MainDict = new DictSegment((char) 0);
229-
// 读取主词典文件
230-
InputStream is = this.getClass().getClassLoader().getResourceAsStream(cfg.getMainDictionary());
231-
if (is == null) {
232-
throw new RuntimeException("Main Dictionary not found!!!");
233-
}
234-
235-
try {
236-
readDict(is, _MainDict);
237-
} catch (IOException ioe) {
238-
System.err.println("Main Dictionary loading exception.");
239-
ioe.printStackTrace();
240-
241-
} finally {
229+
// 获取是否加载主词典
230+
if (cfg.useMainDict()) {
231+
// 读取主词典文件
232+
InputStream is = this.getClass().getClassLoader().getResourceAsStream(cfg.getMainDictionary());
233+
if (is == null) {
234+
throw new RuntimeException("Main Dictionary not found!!!");
235+
}
242236
try {
243-
is.close();
244-
} catch (IOException e) {
245-
e.printStackTrace();
237+
readDict(is, _MainDict);
238+
} catch (IOException ioe) {
239+
System.err.println("Main Dictionary loading exception.");
240+
ioe.printStackTrace();
241+
242+
} finally {
243+
try {
244+
is.close();
245+
} catch (IOException e) {
246+
e.printStackTrace();
247+
}
246248
}
247249
}
248250
// 加载扩展词典

src/main/java/org/wltea/analyzer/dic/Hit.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* IK 中文分词 版本 8.2.0
3-
* IK Analyzer release 8.2.0
2+
* IK 中文分词 版本 8.3.0
3+
* IK Analyzer release 8.3.0
44
*
55
* Licensed to the Apache Software Foundation (ASF) under one or more
66
* contributor license agreements. See the NOTICE file distributed with
@@ -21,8 +21,8 @@
2121
* 版权声明 2012,乌龙茶工作室
2222
* provided by Linliangyi and copyright 2012 by Oolong studio
2323
*
24-
* 8.2.0版本 由 Magese (magese@live.cn) 更新
25-
* release 8.2.0 update by Magese(magese@live.cn)
24+
* 8.3.0版本 由 Magese (magese@live.cn) 更新
25+
* release 8.3.0 update by Magese(magese@live.cn)
2626
*
2727
*/
2828
package org.wltea.analyzer.dic;

0 commit comments

Comments
 (0)