Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions hugegraph-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
<jraft.version>1.3.11</jraft.version>
<ohc.version>0.7.4</ohc.version>
<lz4.version>1.8.0</lz4.version>
<apdplat-word.version>1.3.1</apdplat-word.version>
<mmseg4j-core.version>1.10.0</mmseg4j-core.version>
<jcseg.version>2.6.2</jcseg.version>
<hanlp.version>portable-1.8.3</hanlp.version>
Expand Down Expand Up @@ -125,25 +124,6 @@
</exclusions>
</dependency>

<dependency>
<groupId>org.apdplat</groupId>
<artifactId>word</artifactId>
<version>${apdplat-word.version}</version>
<exclusions>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-core</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-analyzers-common</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.ansj</groupId>
<artifactId>ansj_seg</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ public class AnalyzerFactory {
public static Analyzer analyzer(String name, String mode) {
name = name.toLowerCase();
switch (name) {
case "word":
return new WordAnalyzer(mode);
case "ansj":
return new AnsjAnalyzer(mode);
case "hanlp":
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ public static synchronized CoreOptions instance() {
"search.text_analyzer",
"Choose a text analyzer for searching the " +
"vertex/edge properties, available type are " +
"[word, ansj, hanlp, smartcn, jieba, jcseg, " +
"[ansj, hanlp, smartcn, jieba, jcseg, " +
"mmseg4j, ikanalyzer].",
disallowEmpty(),
"ikanalyzer"
Expand All @@ -582,13 +582,6 @@ public static synchronized CoreOptions instance() {
"search.text_analyzer_mode",
"Specify the mode for the text analyzer, " +
"the available mode of analyzer are " +
"{word: [MaximumMatching, ReverseMaximumMatching, " +
"MinimumMatching, ReverseMinimumMatching, " +
"BidirectionalMaximumMatching, " +
"BidirectionalMinimumMatching, " +
"BidirectionalMaximumMinimumMatching, " +
"FullSegmentation, MinimalWordCount, " +
"MaxNgramScore, PureEnglish], " +
"ansj: [BaseAnalysis, IndexAnalysis, ToAnalysis, " +
"NlpAnalysis], " +
"hanlp: [standard, nlp, index, nShort, shortest, speed], " +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,27 +47,6 @@ public void teardown() {
// pass
}

@Test
public void testWordAnalyzer() {
// MaximumMatching mode
Analyzer analyzer = AnalyzerFactory.analyzer("word", "MaximumMatching");
Assert.assertEquals(setOf("england", "wins", "world", "cup"),
analyzer.segment(TEXT_1));
Assert.assertEquals(setOf("英格兰", "世界杯", "夺冠", "中华人民共和国",
"国歌", "百度", "科技园", "位于", "北京市",
"海淀区", "西北旺", "东路", "10号", "院"),
analyzer.segment(TEXT_2));

// ReverseMaximumMatching mode
analyzer = AnalyzerFactory.analyzer("word", "ReverseMaximumMatching");
Assert.assertEquals(setOf("england", "wins", "world", "cup"),
analyzer.segment(TEXT_1));
Assert.assertEquals(setOf("英格兰", "世界杯", "夺冠", "中华人民共和国",
"国歌", "百度", "科技园", "位于", "北京市",
"海淀区", "西北旺", "东路", "10号", "院"),
analyzer.segment(TEXT_2));
}

@Test
public void testAnsjAnalyzer() {
// BaseAnalysis mode
Expand Down