mmseg4j-solr

MMSEG java chinese analyzer for lucene/solr

License

License

GroupId

GroupId

com.chenlb.mmseg4j
ArtifactId

ArtifactId

mmseg4j-solr
Last Version

Last Version

2.4.0
Release Date

Release Date

Type

Type

jar
Description

Description

mmseg4j-solr
MMSEG java chinese analyzer for lucene/solr
Project URL

Project URL

https://github.com/chenlb/mmseg4j-solr
Project Organization

Project Organization

chenlb.github.io
Source Code Management

Source Code Management

https://github.com/chenlb/mmseg4j-solr/tree/master

Download mmseg4j-solr

How to add to project

<!-- https://jarcasting.com/artifacts/com.chenlb.mmseg4j/mmseg4j-solr/ -->
<dependency>
    <groupId>com.chenlb.mmseg4j</groupId>
    <artifactId>mmseg4j-solr</artifactId>
    <version>2.4.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.chenlb.mmseg4j/mmseg4j-solr/
implementation 'com.chenlb.mmseg4j:mmseg4j-solr:2.4.0'
// https://jarcasting.com/artifacts/com.chenlb.mmseg4j/mmseg4j-solr/
implementation ("com.chenlb.mmseg4j:mmseg4j-solr:2.4.0")
'com.chenlb.mmseg4j:mmseg4j-solr:jar:2.4.0'
<dependency org="com.chenlb.mmseg4j" name="mmseg4j-solr" rev="2.4.0">
  <artifact name="mmseg4j-solr" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.chenlb.mmseg4j', module='mmseg4j-solr', version='2.4.0')
)
libraryDependencies += "com.chenlb.mmseg4j" % "mmseg4j-solr" % "2.4.0"
[com.chenlb.mmseg4j/mmseg4j-solr "2.4.0"]

Dependencies

compile (3)

Group / Artifact Type Version
com.chenlb.mmseg4j : mmseg4j-core jar 1.10.0
org.apache.solr : solr-core jar 6.0.0
org.slf4j : slf4j-api jar 1.7.7

test (5)

Group / Artifact Type Version
org.apache.solr : solr-test-framework jar 6.0.0
org.slf4j : jcl-over-slf4j jar 1.7.7
org.slf4j : log4j-over-slf4j jar 1.7.7
org.slf4j : jul-to-slf4j jar 1.7.7
ch.qos.logback : logback-classic jar 1.1.3

Project Modules

There are no modules declared in this project.

mmseg4j-solr

mmseg4j for lucene or solr

<fieldtype name="textComplex" class="solr.TextField" positionIncrementGap="100">
	<analyzer>
		<tokenizer class="com.chenlb.mmseg4j.solr.MMSegTokenizerFactory" mode="complex" dicPath="dic"/>
	</analyzer>
</fieldtype>
<fieldtype name="textMaxWord" class="solr.TextField" positionIncrementGap="100">
	<analyzer>
		<tokenizer class="com.chenlb.mmseg4j.solr.MMSegTokenizerFactory" mode="max-word" />
	</analyzer>
</fieldtype>
<fieldtype name="textSimple" class="solr.TextField" positionIncrementGap="100">
	<analyzer>
		<tokenizer class="com.chenlb.mmseg4j.solr.MMSegTokenizerFactory" mode="simple" dicPath="n:/custom/path/to/my_dic" />
	</analyzer>
</fieldtype>

tokenizer 的参数:

  • dicPath 参数 - 设置自定义的扩展词库,支持相对路径(相对于 solr_home).
  • mode 参数 - 分词模式。

版本

  • 2.0.0 - 要求 lucene/solr >= 4.3.0。在 lucene/solr [4.3.0, 4.7.1] 测试过兼容可用。
  • 2.1.0 - 要求 lucene/solr 4.8.x
  • 2.2.0 - 要求 lucene/solr [4.9, 4.10.x]
  • 2.3.0 - 要求 lucene/solr [5.0, ]
  • 2.4.0 - 要求 lucene/solr [6.0.0, ], 测试到 6.3.0 通过。

maven

<dependency>
    <groupId>com.chenlb.mmseg4j</groupId>
    <artifactId>mmseg4j-solr</artifactId>
    <version>2.4.0</version>
</dependency>

download

mmseg4j-solr

wiki

wiki

Versions

Version
2.4.0
2.3.1
2.3.0
2.2.0
2.1.0
2.0.0
1.9.1
1.9.0
1.8.6