我的德语词干 SnowballPorterFilterFactory 有问题。我只是无法让它工作。既不是英语也不是德语。我正在使用这个 AnalzyderDef。
@AnalyzerDef(name = "customAnalyzer", charFilters = {
@CharFilterDef(factory = HTMLStripCharFilterFactory.class)},
tokenizer = @TokenizerDef(factory = StandardTokenizerFactory.class),
filters = {
@TokenFilterDef(factory = TrimFilterFactory.class),
@TokenFilterDef(factory = LowerCaseFilterFactory.class),
@TokenFilterDef(factory = SnowballPorterFilterFactory.class, params = {
@Parameter(name = "language", value = "German2")
}),
@TokenFilterDef(factory = WordDelimiterFilterFactory.class, params = {
@Parameter(name = "splitOnCaseChange", value = "1"),
@Parameter(name = "splitOnNumerics", value = "1"),
@Parameter(name = "generateWordParts", value = "1"),
@Parameter(name = "preserveOriginal", value = "1")
}),
@TokenFilterDef(factory = EdgeNGramFilterFactory.class, params = {
@Parameter(name = "minGramSize", value = "5"),
@Parameter(name = "maxGramSize", value = "15"),
@Parameter(name = "side", value = "front")
})
}))
我尝试过这里提到的 walk/walking/walks 。过滤器的组合可能是问题吗?