In the previous article, I analyzed a specific implementation idea, mainly using Chinese Word Segmentation and Unicode encoding to solve the problem that mysql full-text indexes cannot be used for Chinese search, this article will detail Chinese scores
In the previous article, I analyzed a specific implementation idea, mainly using Chinese Word Segmentation and Unicode encoding to solve the problem that mysql full-text indexes cannot be used for Chinese search, this article will detail Chinese scores
In the previous article, I analyzed a specific implementation idea, mainly using Chinese Word Segmentation and Unicode encoding to solve the problem that mysql full-text indexes cannot be used for Chinese search, this article describes how to implement Chinese word segmentation.
The first is to solve the Chinese word segmentation. The Chinese word segmentation is to split a Chinese sentence and get a single word, for example, the sentence "high-paying registered cost engineer". After word segmentation, you will get a single word "high-paying, looking for, and registering cost engineers. I have introduced many Chinese Word Segmentation technologies on the Internet and have good open-source products and service interfaces. However, PHP is the mainstream development language used in combination with our products. Therefore, we prefer to select an open-source Chinese Word Segmentation System scws that supports PHP module extension to facilitate direct integration into the project for calling.
For details about how to install scws and generate the php module, refer to the official documents and Hong Kong server leasing.
After scws is installed and php modules are generated, the US space can directly call the api provided by scws to perform Chinese word segmentation. Below is a method to use php to call scws for Chinese word segmentation, it can be used to test Chinese word segmentation.
If the installation is successful, run the following code and you will receive the output of "register a cost engineer with high salaries.
This article is from the "" blog and is a virtual host in Hong Kong. Please keep this source