Skip to content

Commit e2f3a35

Browse files
committed
Upgrade dependency version
1 parent 6db0ac3 commit e2f3a35

File tree

5 files changed

+23
-19
lines changed

5 files changed

+23
-19
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<dependency>
1414
<groupId>io.patamon.geocoding</groupId>
1515
<artifactId>geocoding</artifactId>
16-
<version>1.1.4</version>
16+
<version>1.1.5</version>
1717
</dependency>
1818
</dependencies>
1919

pom.xml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,18 @@
66

77
<groupId>io.patamon.geocoding</groupId>
88
<artifactId>geocoding</artifactId>
9-
<version>1.1.4</version>
9+
<version>1.1.5</version>
1010

1111
<properties>
1212
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1313
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
14-
<kotlin.version>1.3.61</kotlin.version>
15-
<lucene.version>6.4.0</lucene.version>
14+
<kotlin.version>1.3.72</kotlin.version>
15+
<lucene.version>8.5.2</lucene.version>
1616
<word.version>1.3</word.version>
17-
<gson.version>2.8.0</gson.version>
17+
<gson.version>2.8.6</gson.version>
1818
<ik.analyzer.version>2012_u6</ik.analyzer.version>
19+
<kotlin.compiler.incremental>true</kotlin.compiler.incremental>
20+
<kotlin.compiler.jvmTarget>1.8</kotlin.compiler.jvmTarget>
1921
</properties>
2022

2123
<dependencies>
@@ -50,6 +52,7 @@
5052
</dependency>
5153

5254
<!-- lucene -->
55+
<!--
5356
<dependency>
5457
<groupId>org.apache.lucene</groupId>
5558
<artifactId>lucene-queryparser</artifactId>
@@ -60,6 +63,7 @@
6063
<artifactId>lucene-analyzers-smartcn</artifactId>
6164
<version>${lucene.version}</version>
6265
</dependency>
66+
-->
6367
<!--
6468
<dependency>
6569
<groupId>org.apdplat</groupId>

src/main/java/io/patamon/geocoding/core/impl/DefaultAddressInterpreter.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ open class DefaultAddressInterpreter : AddressInterpreter {
216216

217217
val entity = AddressEntity(address)
218218

219-
// 清洗下开头垃圾数据, 针对海尔用户数据
219+
// 清洗下开头垃圾数据, 针对用户数据
220220
prepare(entity)
221221
// extractBuildingNum, 提取建筑物号
222222
extractBuildingNum(entity)

src/main/java/io/patamon/geocoding/core/segment/SmartCNSegmenter.kt

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package io.patamon.geocoding.core.segment
22

33
import io.patamon.geocoding.core.Segmenter
4-
import org.apache.lucene.analysis.cn.smart.SmartChineseAnalyzer
5-
import org.apache.lucene.analysis.tokenattributes.CharTermAttribute
4+
//import org.apache.lucene.analysis.cn.smart.SmartChineseAnalyzer
5+
//import org.apache.lucene.analysis.tokenattributes.CharTermAttribute
66

77
/**
88
* Desc: lucene 的 smartCN 分词器
@@ -12,22 +12,22 @@ import org.apache.lucene.analysis.tokenattributes.CharTermAttribute
1212
*/
1313
open class SmartCNSegmenter : Segmenter {
1414

15-
private val ANALYZER = SmartChineseAnalyzer()
15+
// private val ANALYZER = SmartChineseAnalyzer()
1616

1717
/**
1818
* 分词方法
1919
*/
2020
override fun segment(text: String): List<String> {
2121
val segs = arrayListOf<String>()
2222
// 切分
23-
val ts = ANALYZER.tokenStream("text", text)
24-
ts.reset()
25-
while (ts.incrementToken()) {
26-
val attr = ts.getAttribute(CharTermAttribute::class.java)
27-
segs.add(attr.toString())
28-
}
29-
ts.end()
30-
ts.close()
23+
// val ts = ANALYZER.tokenStream("text", text)
24+
// ts.reset()
25+
// while (ts.incrementToken()) {
26+
// val attr = ts.getAttribute(CharTermAttribute::class.java)
27+
// segs.add(attr.toString())
28+
// }
29+
// ts.end()
30+
// ts.close()
3131
return segs
3232
}
3333

src/test/java/io/patamon/geocoding/TestSegments.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ class TestSegments {
2727
println(">>> simple 分词: ")
2828
println(simple.segment(text))
2929

30-
println(">>> smart 分词: ")
31-
println(smart.segment(text))
30+
// println(">>> smart 分词: ")
31+
// println(smart.segment(text))
3232

3333
// println(">>> word 分词: ")
3434
// println(word.segment(text))

0 commit comments

Comments
 (0)