1.求shop++的源码pie源码源代码
2.å¦ä½ç®ä¾¿ä½¿ç¨ikanalyzer
求shop++的源代码
主要库
spring-aop-4.0.9.RELEASE
spring-beans-4.0.9.RELEASE
spring-context-4.0.9.RELEASE
spring-context-support-4.0.9.RELEASE
spring-core-4.0.9.RELEASE
spring-expression-4.0.9.RELEASE
spring-jdbc-4.0.9.RELEASE
spring-orm-4.0.9.RELEASE
spring-test-4.0.9.RELEASE
spring-tx-4.0.9.RELEASE
spring-web-4.0.9.RELEASE
spring-webmvc-4.0.9.RELEASE
hibernate-core-4.3.9.Final
hibernate-jpa-2.1-api-1.0.0.Final
hibernate-entitymanager-4.3.9.Final
hibernate-validator-5.1.3.Final
hibernate-search-orm-4.5.3.Final
lucene-core-3.6.2
freemarker-2.3.
ehcache-core-2.6.
ehcache-web-2.0.4
shiro-core-1.2.3
shiro-web-1.2.3
c3p0-0.9.2.1
commons-lang-2.6
commons-beanutils-1.9.2
commons-collections-3.2.1
commons-io-2.4
commons-net-3.3
commons-fileupload-1.3.1
commons-codec-1.
commons-email-1.3.3
commons-compress-1.9
junit-4.
/dtd/properties.dtd">
<properties>
<comment>IK Analyzer æ©å±é ç½®</comment>
<entry key="ext_dict">/ikdic/ext_keyword.dic;</entry>//å¨classpathæ ¹ç®å½ä¸çikdicå ä¸çext_keyword.dic,为æ©å±åå ¸
<entry key="ext_stopwords">/ikdic/ext_stopword.dic</entry> //å¨classpathæ ¹ç®å½ä¸çikdicå ä¸çext_stopword.dic,为åæ¢åå ¸
</properties>
è³äºè°ç¨æ¯å¾ç®åçï¼
package org.bdp.util;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.util.ArrayList;
import java.util.List;
import org.wltea.analyzer.core.IKSegmenter;
import org.wltea.analyzer.core.Lexeme;
public class CZIKAnaUtil {
public static void main(String[] args) {
String str = "æå(-)";
IKAnalysis(str);
}
public static List<String> IKAnalysis(String str) {
List<String> keywordList = new ArrayList<String>();
try {
byte[] bt = str.getBytes();
InputStream ip = new ByteArrayInputStream(bt);
Reader read = new InputStreamReader(ip);
IKSegmenter iks = new IKSegmenter(read,true);//trueå¼å¯åªè½åè¯æ¨¡å¼ï¼å¦æä¸è®¾ç½®é»è®¤ä¸ºfalseï¼ä¹å°±æ¯ç»ç²åº¦åå²
Lexeme t;
while ((t = iks.next()) != null) {
keywordList.add(t.getLexemeText());
}
} catch (IOException e) {
e.printStackTrace();
}
/* for (int i = 0; i < keyWordList.size() - 1; i++) {
for (int j = keyWordList.size() - 1; j > i; j--) {
if (keyWordList.get(j).equals(keyWordList.get(i))) {
keyWordList.remove(j);
}
}
}
Collections.sort(keyWordList, new Comparator<String>() {
@Override
public int compare(String o1, String o2) {
return o2.length() - o1.length();
}
})*/
System.out.println(keywordList);
return keywordList;
}
}