SCWS is short for SimpleChineseWordsSegmentation, which is a simple Chinese Word Segmentation System. This is a set of mechanical Chinese Word Segmentation Engines Based on Word Frequency dictionaries. It can divide a full range of Chinese characters into words. Words are the basic units of Chinese characters, but they are not separated by spaces in English, so how to accurately and quickly
SCWS is short for Simple Chinese Words Segmentation, which is a Simple Chinese Word Segmentation System. This is a set of mechanical Chinese Word Segmentation Engines Based on Word Frequency dictionaries. It can divide a full range of Chinese characters into words. Words are the basic units of Chinese characters, but they are not separated by spaces in English, so how to accurately and quickly
SCWS is short for Simple Chinese Words Segmentation, which is a Simple Chinese Word Segmentation System.
This is a set of mechanical Chinese Word Segmentation Engines Based on Word Frequency dictionaries. It can divide a full range of Chinese characters into words. Words are the basic units of Chinese characters. Unlike English Words, words are separated by spaces. Therefore, accurate and fast word segmentation has always been a challenge for Chinese word segmentation.
Due to the use of PHPCMS, the website configuration found such an automatic Chinese word segmentation, good things can not be used. Now we will record the installation process in detail. Most of the text is from the official website of SCWS. I just added some differences in the actual operation process to facilitate more accurate and detailed expressions.
Install php_scws.dll/Win32
1. Download the compiled php_scws.dll extension library based on your current PHP version.
Currently supports the PHP-4.4.x and PHP-5.2.x series, respectively:
Php-4.4.x: http://www.ftphp.com/scws/down/scws-1.0.0_win32_php-4.4.x.zip
Php-5.2.x: http://www.ftphp.com/scws/down/scws-1.0.0_win32_php-5.2.x.zip
2. decompress the downloaded zip file to obtain php_scws.dll, and place the file in the php installation directory.
Go to the ext/directory (usually X:/php/ext /).
3. Create a local directory to store rule set files and dictionary files. We recommend that you use C:/program files/scws/etc.
4. Download the dictionary files and rule set files from the scws homepage, decompress the files, and put *. xdb and *. ini in the preceding directory.
Rule Set: http://www.ftphp.com/scws/down/scws-rules-all.zip
Dictionary generation: http://www.ftphp.com/scws/down/scws-dict-chs-gbk.tar.bz2
Http://www.ftphp.com/scws/down/scws-dict-chs-utf8.tar.bz2
Http://www.ftphp.com/scws/down/scws-dict-cht-utf8.tar.bz2
4. Modify php. ini to a directory such as C:/windows/php. ini or C:/winnt/php. ini,
Add the following lines to the end of php. ini:
[Scws]
;
Check whether the set value of extension_dir in php. ini is correct. Otherwise, set extension_dir to null,
And then specify php_scws.dll as the absolute path.
;
Extension = php_scws.dll
Scws. default. charset = gbk (utf8 is recommended for utf versions, not UTF-8)
Scws. default. fpath = "c:/program files/scws/etc"
5. Restart the web server.