<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-Hans-CN">
	<id>https://wiki.riguz.com/index.php?action=history&amp;feed=atom&amp;title=C%2B%2B%3AFriso%E5%88%86%E8%AF%8D%E5%BA%93</id>
	<title>C++:Friso分词库 - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.riguz.com/index.php?action=history&amp;feed=atom&amp;title=C%2B%2B%3AFriso%E5%88%86%E8%AF%8D%E5%BA%93"/>
	<link rel="alternate" type="text/html" href="https://wiki.riguz.com/index.php?title=C%2B%2B:Friso%E5%88%86%E8%AF%8D%E5%BA%93&amp;action=history"/>
	<updated>2026-06-03T00:55:09Z</updated>
	<subtitle>本wiki上该页面的版本历史</subtitle>
	<generator>MediaWiki 1.42.3</generator>
	<entry>
		<id>https://wiki.riguz.com/index.php?title=C%2B%2B:Friso%E5%88%86%E8%AF%8D%E5%BA%93&amp;diff=1621&amp;oldid=prev</id>
		<title>2016年6月12日 (日) 09:01 imported&gt;Soleverlee</title>
		<link rel="alternate" type="text/html" href="https://wiki.riguz.com/index.php?title=C%2B%2B:Friso%E5%88%86%E8%AF%8D%E5%BA%93&amp;diff=1621&amp;oldid=prev"/>
		<updated>2016-06-12T09:01:40Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;zh-Hans-CN&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2016年6月12日 (日) 09:01的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;第1行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第1行：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Friso &lt;/del&gt;http://git.oschina.net/lionsoul/friso]是一个国人编写的C/C++的分词库。最近准备在一个小项目中用到。&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[http://git.oschina.net/lionsoul/friso &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Friso&lt;/ins&gt;]是一个国人编写的C/C++的分词库。最近准备在一个小项目中用到。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;//创建 friso_t&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;//创建 friso_t&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki_db:diff:1.41:old-1620:rev-1621:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>imported&gt;Soleverlee</name></author>
	</entry>
	<entry>
		<id>https://wiki.riguz.com/index.php?title=C%2B%2B:Friso%E5%88%86%E8%AF%8D%E5%BA%93&amp;diff=1620&amp;oldid=prev</id>
		<title>imported&gt;Soleverlee：​以“[Friso http://git.oschina.net/lionsoul/friso]是一个国人编写的C/C++的分词库。最近准备在一个小项目中用到。 &lt;source lang=&quot;cpp&quot;&gt; //创建 fris...”为内容创建页面</title>
		<link rel="alternate" type="text/html" href="https://wiki.riguz.com/index.php?title=C%2B%2B:Friso%E5%88%86%E8%AF%8D%E5%BA%93&amp;diff=1620&amp;oldid=prev"/>
		<updated>2016-06-12T09:01:07Z</updated>

		<summary type="html">&lt;p&gt;以“[Friso http://git.oschina.net/lionsoul/friso]是一个国人编写的C/C++的分词库。最近准备在一个小项目中用到。 &amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt; //创建 fris...”为内容创建页面&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[Friso http://git.oschina.net/lionsoul/friso]是一个国人编写的C/C++的分词库。最近准备在一个小项目中用到。&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
//创建 friso_t&lt;br /&gt;
friso_t friso = friso_new();&lt;br /&gt;
//创建词库 dic(并没有加载词库)&lt;br /&gt;
friso_config_t config = friso_new_config();&lt;br /&gt;
//从指定的 friso.ini 配置文件中初始化 friso 和 config&lt;br /&gt;
//__path__为 friso.ini 配置文件的地址&lt;br /&gt;
//成功返回 1, 失败返回 0&lt;br /&gt;
int res = friso_init_from_ifile(friso, config, &amp;quot;friso.ini&amp;quot;);&lt;br /&gt;
if(res != 1)&lt;br /&gt;
{&lt;br /&gt;
	qDebug() &amp;lt;&amp;lt; &amp;quot;Load friso failed&amp;quot;;&lt;br /&gt;
	return -1;&lt;br /&gt;
}&lt;br /&gt;
//自定义切分模式(简易，复杂，检测模式)&lt;br /&gt;
//__FRISO_SIMPLE_MODE__&lt;br /&gt;
//__FRISO_COMPLEX_MODE__&lt;br /&gt;
//__FRISO_DETECT_MODE__&lt;br /&gt;
friso_set_mode(config, __FRISO_COMPLEX_MODE__);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//创建一个分词任务实例&lt;br /&gt;
friso_task_t task = friso_new_task();&lt;br /&gt;
//给分词任务设置分词的内容.&lt;br /&gt;
fstring text = &amp;quot;我的银行卡账号和密码&amp;quot;;&lt;br /&gt;
friso_set_text( task, text );&lt;br /&gt;
&lt;br /&gt;
while ( ( config-&amp;gt;next_token( friso, config, task ) ) != NULL ) {&lt;br /&gt;
	//查看 friso_token_t 可以获取更多信息。&lt;br /&gt;
	//printf(&amp;quot;%s[%d]/ &amp;quot;, task-&amp;gt;token-&amp;gt;word, task-&amp;gt;token-&amp;gt;offset );&lt;br /&gt;
	qDebug() &amp;lt;&amp;lt; task-&amp;gt;token-&amp;gt;word;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//释放 friso_task_t 实例&lt;br /&gt;
friso_free_task( task );&lt;br /&gt;
//释放 friso_t 实例&lt;br /&gt;
friso_free(friso);&lt;br /&gt;
friso_free_config(config);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
输出结果：&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
我的 &lt;br /&gt;
银行卡 &lt;br /&gt;
账号 &lt;br /&gt;
密码 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Category:Programe]]&lt;/div&gt;</summary>
		<author><name>imported&gt;Soleverlee</name></author>
	</entry>
</feed>