各种分词初探

1、庖丁分词
<dependency>
		  <groupId>net.paoding</groupId>
		  <artifactId>paoding-analysis</artifactId>
		  <version>2.0.4</version>
		  <exclusions>
				<exclusion>
					<groupId>org.slf4j</groupId>
					<artifactId>slf4j-api</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.slf4j</groupId>
					<artifactId>slf4j-log4j12</artifactId>
				</exclusion>
				<exclusion>
					<groupId>log4j</groupId>
					<artifactId>log4j</artifactId>
				</exclusion>
			</exclusions>
		</dependency>


参考:
http://git.oschina.net/zhzhenqin/paoding-analysis/tree/master

2、dic 放在工程目录下
D:\IDEA\idea_project_new\ddshow-data\ddshow-storm
paoding-dic-home.properties

#values are "system-env" or "this";
#if value is "this" , using the paoding.dic.home as dicHome if configed!
#paoding.dic.home.config-fisrt=system-env

#dictionary home (directory)
#"classpath:xxx" means dictionary home is in classpath.
#e.g "classpath:dic" means dictionaries are in "classes/dic" directory or any other classpath directory
paoding.dic.home=classpath:dic

#seconds for dic modification detection
#paoding.dic.detector.interval=60



3、报错
Exception in thread "main" java.lang.NoSuchMethodError: org.apache.lucene.store.NativeFSLockFactory.<init>(Ljava/lang/String;)V
	at net.paoding.analysis.knife.PaodingMaker$1.run(PaodingMaker.java:411)
	at net.paoding.analysis.knife.PaodingMaker.implMake(PaodingMaker.java:406)
	at net.paoding.analysis.knife.PaodingMaker.make(PaodingMaker.java:125)
	at net.paoding.analysis.analyzer.PaodingAnalyzer.init(PaodingAnalyzer.java:73)
	at net.paoding.analysis.analyzer.PaodingAnalyzer.<init>(PaodingAnalyzer.java:59)
	at net.paoding.analysis.analyzer.PaodingAnalyzer.<init>(PaodingAnalyzer.java:52)
	at com.laifeng.util.ContentUtils.main(ContentUtils.java:172)


4、参考配置
http://www.oschina.net/code/snippet_259382_14635

你可能感兴趣的:(分词)