现在的位置: 首页 > 综合 > 正文

Bag标签之一行代码实行中文分词实例3

2018年04月20日 ⁄ 综合 ⁄ 共 620字 ⁄ 字号 评论关闭

例3

分词(返回一个书包,以_0_1_2
...
取出分好的词

<bag id=words act=2words>我喜欢黄色高领T恤衫</bag>

注意没有name属性
输出分词结果

<b>结果词组: </b>
<for end="@{words:getWidth}">
       <span>@{words:_@{for:getSuffix}} </span>
</for>

效果

完整代码

<html>
<title>分词:返回一个书包,以_0、_1、_2 ...取出分好的词</title>
<h3>分词:返回一个书包,以_0、_1、_2 ...取出分好的词</h3>
<p>
<chtml>
<bag id=words act=2words>我喜欢黄色高领T恤衫</bag>
<b>结果词组: </b>
<for end="@{words:getWidth}">
	<span>@{words:_@{for:getSuffix}} </span>
</for>
</chtml>
</p>
</html>

(例子文件:_samples/2words3.html)

轻开平台资源下载及说明

平台及最新开发手册免费下载:http://download.csdn.net/detail/tx18/8464425

开发实例:轻开B2C电子商务网站,免费下载:http://download.csdn.net/detail/tx18/8318585

轻开平台会不定期升级为大家提供更多强大而Easy的功能,请留意下载最新的版本

抱歉!评论已关闭.