File tree Expand file tree Collapse file tree 5 files changed +23
-19
lines changed
main/java/io/patamon/geocoding/core
test/java/io/patamon/geocoding Expand file tree Collapse file tree 5 files changed +23
-19
lines changed Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 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 >
5052 </dependency >
5153
5254 <!-- lucene -->
55+ <!--
5356 <dependency>
5457 <groupId>org.apache.lucene</groupId>
5558 <artifactId>lucene-queryparser</artifactId>
6063 <artifactId>lucene-analyzers-smartcn</artifactId>
6164 <version>${lucene.version}</version>
6265 </dependency>
66+ -->
6367 <!--
6468 <dependency>
6569 <groupId>org.apdplat</groupId>
Original file line number Diff line number Diff 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)
Original file line number Diff line number Diff line change 11package io.patamon.geocoding.core.segment
22
33import 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 */
1313open 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
Original file line number Diff line number Diff 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))
You can’t perform that action at this time.
0 commit comments