Example 3: one line of the Bag tag implements Chinese word segmentation.

Source: Internet
Author: User

Example 3: one line of the Bag tag implements Chinese word segmentation.

Example 3:

Word Segmentation (returns a schoolbag with _ 0, _ 1, _ 2... to retrieve the words that have been divided)

<Bag id = words act = 2 words> I like a yellow high-neck t-shirt </bag>
Note not NameAttribute
Output word splitting result

<B> result phrase: </B> <for end = "@ {words: getWidth}"> <span >@{ words: _ @ {: getSuffix }}</span> </for>
Effect

Complete code

<Html> <title> Word Segmentation: returns a schoolbag with _ 0, _ 1, _ 2... extracted words </title> 

(Example file: _ samples/2words3.html)

Download and description of light platform Resources

Platform and the latest development manual free download: http://download.csdn.net/detail/tx18/8464425

Development Instance:Light B2C e-commerce websites, Free download: http://download.csdn.net/detail/tx18/8318585

The light-Open Platform will occasionally upgrade to provide more powerful and Easy functions for you. Please note thatDownload the latest version


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.