我正在为 Postgresql 8.4 构建一个定制的 ispell 字典配置,并且在正确解析带有撇号的单词时遇到一些问题。 Postgresql 中包含的 ispell 字典包含一个 .affix 文件,其中包含一个“M”SFX 规则,该规则指定其单词的扩展形式。
这是一个例子,假设我有dictionary/SM
在我的字典文件中:
SELECT to_tsvector('english_ispell', 'dictionary''s dictionaries');
预期输出:
'dictionary':1,2
实际输出:
s':2, 'dictionary':1,3
我做错了什么吗?这是 ts_debug 的输出,显示其解析方式。
SELECT * FROM ts_debug('english_ispell', 'dictionary''s dictionaries');
alias | description | token | dictionaries | dictionary | lexemes
-----------+-----------------+--------------+-------------------------------+----------------+--------------
asciiword | Word, all ASCII | dictionary | {english_ispell,english_stem} | english_ispell | {dictionary}
blank | Space symbols | ' | {} | |
asciiword | Word, all ASCII | s | {english_ispell,english_stem} | english_ispell | {s}
blank | Space symbols | | {} | |
asciiword | Word, all ASCII | dictionaries | {english_ispell,english_stem} | english_ispell | {dictionary}
如何让 Postgresql 解析'
作为单个单词的一部分而不是将其分解为“空间符号”?