On this page
SCWS相关的内容
Last updated on
25 February 2018
scws 是迅搜使用的中文分词器,该分词器提供了一个基于php二进制扩展的接口,可供PHP程序调用。
与Drupal自带Search模块的整合
有些比较小的网站,并不需要高级复杂的检索功能,Drupal自带的Search模块完全可以满足需要。在此情况下,本模块实际上支持使用 SCWS 对Search模块的文本内容进行中文分词。你需要安装 scws-php 这个PHP扩展模块(二进制包),系统会自动检索scws的二进制扩展,或者迅搜的PHP SDK,通过Search模块的 hook_search_preprocess() 钩子对传入的字符串进行中文分词。
要启用Search模块的scws分词,你需要在Search的设置里,关闭简单CJK分词选项,同时打开“使用scws分词”选项,并选择适合的scws/迅搜SDK路径。系统目前会自动检测 scws的php二进制扩展、迅搜的各种安装默认安装路径。如果系统找不到适合的SDK,则不会显示“使用scws分词”选项。
Help improve this page
Page status: No known problems
You can:
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion