Endeca Segmenter.jar Study

简介:

 First I give the architecture of the Segmentation and  Translit aftering analyzing the classes in the Segmenter.jar written by  endeca.com group.

 

 

Segmentation process:


 

Translit process:


 

We can see the two process are just use the same design pattern .Use adapter to modify the interface that can be suitable to be wrapped into the Runnable thread, and in the inner implementation ,it delegate the AdapterHandler to handle it .

 

Segmenter process  is used for segmentation ABCDE to A B C D E.

Translit process is used for read the feed file and make dictionary.

AdapterConfig ,( I cannot see the source code or decompiled code ,because ENDECA is not open sourced),but just guess from it ,I think it is a configuration wrapper class which can be mapped to some adapter configuration in the form of xml.

AdapterHandler, (still I cannot see the source code) .I think it can wrap some callback method and be used in the Segmenter  & Translit  process.

 

Some functions I cannot totally understand ,which prevent me from understanding the whole process .

1.        The first() method in the AdapterConfig class , I know it is used to retrieve maybe the first element which map the element tagged in the parameter ,but I do not know which file it parses.

2.       The emit() method in the AdapterHandler class





本文转自 charles_wang888 51CTO博客,原文链接:http://blog.51cto.com/supercharles888/834188,如需转载请自行联系原作者

目录
相关文章
|
2月前
|
IDE Java Linux
classpath和jar3-15
classpath和jar3-15
|
3月前
|
Java Maven Windows
java -jar 启动 boot 程序 no main manifest attribute, in .\vipsoft-model-web-0.0.1-SNAPSHOT.jar
java -jar 启动 boot 程序 no main manifest attribute, in .\vipsoft-model-web-0.0.1-SNAPSHOT.jar
61 0
|
IDE Java 开发工具
解决IntelliJ IDEA报错Error:Cannot determine path to ‘tools.jar‘ library for 17 (D:/JAVA)
解决IntelliJ IDEA报错Error:Cannot determine path to ‘tools.jar‘ library for 17 (D:/JAVA)
1489 0
|
Java Maven
idea中maven打包工具类 repackage failed: Unable to find main class
idea中maven打包工具类 repackage failed: Unable to find main class
341 1
|
11月前
|
Java 计算机视觉 Windows
jar 手动 打包文件 so, class ,jar
jar 手动 打包文件 so, class ,jar
159 0
|
算法 IDE Java
springBoot导入本地jar并且要求通过maven打包到项目的jar中|Unable to open nested jar file 'BOOT-INF/lib/xxxxxx.jar'
springBoot导入本地jar并且要求通过maven打包到项目的jar中|Unable to open nested jar file 'BOOT-INF/lib/xxxxxx.jar'
|
Java 应用服务中间件 容器
理解:jar和war的区别
理解:jar和war的区别
123 0
|
Java Maven Android开发
Missing artifact com.sun tools.jar 1.5.0 system 解决方法
Missing artifact com.sun tools.jar 1.5.0 system 解决方法
196 0
java有关的打包文件.jar、.war、.ear
java有关的打包文件.jar、.war、.ear
126 0
|
XML Java 测试技术
【Maven 官方教程】Building Java Projects
Create the directory structure mkdir -p src/main/java/hello on *nix systems └── src └── main └── java └── hello create these two classes: HelloWorld.java and Greeter.java. src/main/java/hello/HelloWorld.java
128 0