Mysql full-text search practice (2)

Source: Internet
Author: User
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

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.