你能改变Sphinx中wordform和lemmatizer之间的优先级吗?

时间:2015-12-11 06:31:21

标签: sphinx stemming

如果我把变形器打开,那么复数就会起作用,例如

Office=Offices
Dog=Dogs

但是,如果我制作一个与复数无关的字形,如

100 > Hundred

然后百人不会与数百人相提并论(我意识不是一个完美的例子,所以不要从字面上理解)。

所以问题是,是否有任何其他类型的字形或过程可以让你先应用词干然后再形成字形?那么在这种情况下,它会阻止数百到数百,以便100匹配数百和数百?

1 个答案:

答案 0 :(得分:0)

请参阅http://sphinxsearch.com/docs/current.html#conf-wordforms

有一些特殊的语法可用于形态学。

> curl -I "https://www.gravatar.com/avatar/fd43775c1ea617f12187cab9785ef2d0?s=32&d=identicon&r=PG&f=1"

HTTP/1.1 200 OK
Accept-Ranges: bytes
Access-Control-Allow-Origin: *
Cache-Control: max-age=300
Content-Type: image/png
Date: Mon, 14 Dec 2015 09:48:41 GMT
Expires: Mon, 14 Dec 2015 09:53:41 GMT
Last-Modified: Wed, 11 Jan 1984 08:00:00 GMT
Link: <https://www.gravatar.com/avatar/fd43775c1ea617f12187cab9785ef2d0?s=32&d=identicon&r=PG&f=1>; rel="canonical"
Server: ECS (fcn/9F89)
Source-Age: 140
Via: 1.1 varnish-v4
X-Cache: HIT
X-Varnish: 336435067 334859069
Content-Length: 768

您需要手动将形态学应用于右侧。

这里的一些代码: http://sphinxsearch.com/forum/view.html?id=13907 这可能有助于创建这种风格的文字形式。