<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title><![CDATA[Hightman 论坛 - 所有版面]]></title>
		<link>http://www.hightman.cn/bbs/</link>
		<description><![CDATA[Hightman 论坛 - http://www.hightman.cn/bbs]]></description>
		<pubDate>Sat, 04 Sep 2010 02:45:04 +0800</pubDate>
		<generator>MyBB</generator>
		<item>
			<title><![CDATA[php扩展问题]]></title>
			<link>http://www.hightman.cn/bbs/showthread.php?tid=811</link>
			<pubDate>Mon, 30 Aug 2010 11:01:18 +0800</pubDate>
			<guid isPermaLink="false">http://www.hightman.cn/bbs/showthread.php?tid=811</guid>
			<description><![CDATA[php.ini 加了scws.so的地址，重启php出现<br />
PHP Warning:  PHP Startup: scws: Unable to initialize module<br />
Module compiled with module API=20050922, debug=0, thread-safety=0<br />
PHP    compiled with module API=20060613, debug=0, thread-safety=0<br />
These options need to match<br />
 in Unknown on line 0<br />
<br />
php版本:<br />
linux centos PHP Version 5.2.13]]></description>
			<content:encoded><![CDATA[php.ini 加了scws.so的地址，重启php出现<br />
PHP Warning:  PHP Startup: scws: Unable to initialize module<br />
Module compiled with module API=20050922, debug=0, thread-safety=0<br />
PHP    compiled with module API=20060613, debug=0, thread-safety=0<br />
These options need to match<br />
 in Unknown on line 0<br />
<br />
php版本:<br />
linux centos PHP Version 5.2.13]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[无法打开类型为 xdb 数据文件 是什么问题？]]></title>
			<link>http://www.hightman.cn/bbs/showthread.php?tid=810</link>
			<pubDate>Sat, 28 Aug 2010 12:13:27 +0800</pubDate>
			<guid isPermaLink="false">http://www.hightman.cn/bbs/showthread.php?tid=810</guid>
			<description><![CDATA[今天换服务器上出现这个问题<br />
<div class="codeblock">
<div class="title">代码:<br />
</div><div class="body" dir="ltr"><code>Warning: XDB::Open(dict.xdb) failed. in D:&#92;99dy&#92;include&#92;scws&#92;xdb_r.class.php on line 44<br />
<br />
Fatal error: 无法打开类型为 xdb 数据文件 `include/scws/dict/dict.xdb` in D:&#92;99dy&#92;include&#92;scws&#92;dict.class.php on line 155</code></div></div>
<br />
是什么原因？]]></description>
			<content:encoded><![CDATA[今天换服务器上出现这个问题<br />
<div class="codeblock">
<div class="title">代码:<br />
</div><div class="body" dir="ltr"><code>Warning: XDB::Open(dict.xdb) failed. in D:&#92;99dy&#92;include&#92;scws&#92;xdb_r.class.php on line 44<br />
<br />
Fatal error: 无法打开类型为 xdb 数据文件 `include/scws/dict/dict.xdb` in D:&#92;99dy&#92;include&#92;scws&#92;dict.class.php on line 155</code></div></div>
<br />
是什么原因？]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[SCWS不支持英文和中英文混合分词吗？]]></title>
			<link>http://www.hightman.cn/bbs/showthread.php?tid=809</link>
			<pubDate>Tue, 24 Aug 2010 18:50:37 +0800</pubDate>
			<guid isPermaLink="false">http://www.hightman.cn/bbs/showthread.php?tid=809</guid>
			<description><![CDATA[我现在想要做屏蔽词，只载入自定义的屏蔽词库，但好像英文及中英文混合分词都无效。<br />
譬如：<br />
&#36;so = scws_new();<br />
&#36;so-&gt;set_charset('utf8');<br />
&#36;so-&gt;set_dict('words.txt',SCWS_XDICT_TXT);<br />
&#36;so-&gt;set_ignore(true);<br />
&#36;so-&gt;send_text("GMhello指导员");<br />
echo '&lt;pre&gt;';<br />
while (&#36;tmp = &#36;so-&gt;get_result())<br />
{<br />
	var_dump(&#36;tmp);<br />
}<br />
&#36;so-&gt;close();<br />
<br />
在words.txt只定义如下内容<br />
GM	1.0	1.0	*<br />
hello指导员	1.0	1.0	*<br />
<br />
而输出结果为：<br />
array(1) {<br />
  [0&#93;=&gt;<br />
  array(5) {<br />
    ["word"&#93;=&gt;<br />
    string(7) "GMhello"<br />
    ["off"&#93;=&gt;<br />
    int(0)<br />
    ["len"&#93;=&gt;<br />
    int(7)<br />
    ["idf"&#93;=&gt;<br />
    float(4.86477518082)<br />
    ["attr"&#93;=&gt;<br />
    string(2) "en"<br />
  }<br />
}<br />
<br />
"GM"和"hello"被合并了且"attr"变成了"en"而不是定义的"*"，而"hello指导员"被拆分了。<br />
实际上我只载入了我自定义的词库。<br />
如果我只用全中文的分词是正常的。<br />
不知道SCWS是不是不支持英文的分词啊。]]></description>
			<content:encoded><![CDATA[我现在想要做屏蔽词，只载入自定义的屏蔽词库，但好像英文及中英文混合分词都无效。<br />
譬如：<br />
&#36;so = scws_new();<br />
&#36;so-&gt;set_charset('utf8');<br />
&#36;so-&gt;set_dict('words.txt',SCWS_XDICT_TXT);<br />
&#36;so-&gt;set_ignore(true);<br />
&#36;so-&gt;send_text("GMhello指导员");<br />
echo '&lt;pre&gt;';<br />
while (&#36;tmp = &#36;so-&gt;get_result())<br />
{<br />
	var_dump(&#36;tmp);<br />
}<br />
&#36;so-&gt;close();<br />
<br />
在words.txt只定义如下内容<br />
GM	1.0	1.0	*<br />
hello指导员	1.0	1.0	*<br />
<br />
而输出结果为：<br />
array(1) {<br />
  [0]=&gt;<br />
  array(5) {<br />
    ["word"]=&gt;<br />
    string(7) "GMhello"<br />
    ["off"]=&gt;<br />
    int(0)<br />
    ["len"]=&gt;<br />
    int(7)<br />
    ["idf"]=&gt;<br />
    float(4.86477518082)<br />
    ["attr"]=&gt;<br />
    string(2) "en"<br />
  }<br />
}<br />
<br />
"GM"和"hello"被合并了且"attr"变成了"en"而不是定义的"*"，而"hello指导员"被拆分了。<br />
实际上我只载入了我自定义的词库。<br />
如果我只用全中文的分词是正常的。<br />
不知道SCWS是不是不支持英文的分词啊。]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[麻烦站长解释一下“透过scws_get_result()取数据时自行排除单个字”]]></title>
			<link>http://www.hightman.cn/bbs/showthread.php?tid=808</link>
			<pubDate>Fri, 20 Aug 2010 19:00:46 +0800</pubDate>
			<guid isPermaLink="false">http://www.hightman.cn/bbs/showthread.php?tid=808</guid>
			<description><![CDATA[今天刚安装好了，用了很舒服。但有些分好的词都带有某些不重要的字。<br />
<br />
如“我的秘密花园”里面的‘我’，‘的’我是都想去掉的。看了你的回帖，但是摸不着头脑是如何通过透过scws_get_result()取数据时自行排除...<br />
<br />
还请站长指教一二，或者有经验的朋友指点一下啊。<br />
<br />
非常感谢！]]></description>
			<content:encoded><![CDATA[今天刚安装好了，用了很舒服。但有些分好的词都带有某些不重要的字。<br />
<br />
如“我的秘密花园”里面的‘我’，‘的’我是都想去掉的。看了你的回帖，但是摸不着头脑是如何通过透过scws_get_result()取数据时自行排除...<br />
<br />
还请站长指教一二，或者有经验的朋友指点一下啊。<br />
<br />
非常感谢！]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Hightman您好，我的分词怎么不对啊]]></title>
			<link>http://www.hightman.cn/bbs/showthread.php?tid=807</link>
			<pubDate>Wed, 18 Aug 2010 21:11:52 +0800</pubDate>
			<guid isPermaLink="false">http://www.hightman.cn/bbs/showthread.php?tid=807</guid>
			<description><![CDATA[终于编译了，也设置成功，字典位置也很正确，可是分词却不对！！<br />
No. WordString               Attr  Weight(times)<br />
-------------------------------------------------<br />
01. 权利                     nr    7.00(2)<br />
02. 陈凯歌                   nr    3.50(1)<br />
03. 包括导                   nr    3.50(1)<br />
04. 权人                     nr    3.50(1)<br />
05. 权归电                   nr    3.50(1)<br />
06. 成小                     nr    3.50(1)<br />
07. 成半个                   nr    3.50(1)<br />
08. 连环画                   nr    3.50(1)<br />
09. 权利人                   nr    3.50(1)<br />
10. 许可又                   nr    3.50(1)<br />
<br />
<br />
-------------------------------------------------<br />
陈凯歌/nr 权人/nr 权归电/nr <br />
<br />
包括导/nr 成小/nr 连环画/nr 成半个/nr <br />
<br />
一个/mt 权利/nr 权利/nr 权利人/nr 许可又/nr <br />
<br />
一九八零年/mt <br />
<br />
这是怎么回事啊]]></description>
			<content:encoded><![CDATA[终于编译了，也设置成功，字典位置也很正确，可是分词却不对！！<br />
No. WordString               Attr  Weight(times)<br />
-------------------------------------------------<br />
01. 权利                     nr    7.00(2)<br />
02. 陈凯歌                   nr    3.50(1)<br />
03. 包括导                   nr    3.50(1)<br />
04. 权人                     nr    3.50(1)<br />
05. 权归电                   nr    3.50(1)<br />
06. 成小                     nr    3.50(1)<br />
07. 成半个                   nr    3.50(1)<br />
08. 连环画                   nr    3.50(1)<br />
09. 权利人                   nr    3.50(1)<br />
10. 许可又                   nr    3.50(1)<br />
<br />
<br />
-------------------------------------------------<br />
陈凯歌/nr 权人/nr 权归电/nr <br />
<br />
包括导/nr 成小/nr 连环画/nr 成半个/nr <br />
<br />
一个/mt 权利/nr 权利/nr 权利人/nr 许可又/nr <br />
<br />
一九八零年/mt <br />
<br />
这是怎么回事啊]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[一个题外话，请教hightman大侠编写php扩展的经验]]></title>
			<link>http://www.hightman.cn/bbs/showthread.php?tid=806</link>
			<pubDate>Wed, 18 Aug 2010 19:05:15 +0800</pubDate>
			<guid isPermaLink="false">http://www.hightman.cn/bbs/showthread.php?tid=806</guid>
			<description><![CDATA[最近在研究PHP扩展的开发，看了一些资料，发现没有一篇文章、一份资料能非常全面的把PHP扩展开发讲明白，hightman写的scws的php扩展非常好，可以分享一下参考了哪些资料，还有经验总结么？]]></description>
			<content:encoded><![CDATA[最近在研究PHP扩展的开发，看了一些资料，发现没有一篇文章、一份资料能非常全面的把PHP扩展开发讲明白，hightman写的scws的php扩展非常好，可以分享一下参考了哪些资料，还有经验总结么？]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[SCWS切分的字符串是否有长度限制？]]></title>
			<link>http://www.hightman.cn/bbs/showthread.php?tid=805</link>
			<pubDate>Wed, 18 Aug 2010 18:58:54 +0800</pubDate>
			<guid isPermaLink="false">http://www.hightman.cn/bbs/showthread.php?tid=805</guid>
			<description><![CDATA[在linux下装了scws1.1.2，并且装了php5的扩展，但是发现在分词时对于较长的字符串会自动截取前多少个字符进行切分，不知这是不是一个BUG？]]></description>
			<content:encoded><![CDATA[在linux下装了scws1.1.2，并且装了php5的扩展，但是发现在分词时对于较长的字符串会自动截取前多少个字符进行切分，不知这是不是一个BUG？]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[为什么我编译SCWS-1.1.1失败]]></title>
			<link>http://www.hightman.cn/bbs/showthread.php?tid=804</link>
			<pubDate>Wed, 18 Aug 2010 09:56:14 +0800</pubDate>
			<guid isPermaLink="false">http://www.hightman.cn/bbs/showthread.php?tid=804</guid>
			<description><![CDATA[checking for pow... yes<br />
checking for realpath... yes<br />
checking for strcasecmp... yes<br />
checking for strchr... yes<br />
checking for strdup... yes<br />
checking for strrchr... yes<br />
checking for strndup... yes<br />
checking for strtok_r... yes<br />
checking for mmap... yes<br />
checking for struct flock... yes<br />
configure: creating ./config.status<br />
config.status: creating Makefile<br />
config.status: WARNING:  'Makefile.in' seems to ignore the --datarootdir setting<br />
config.status: creating libscws/Makefile<br />
config.status: WARNING:  'libscws/Makefile.in' seems to ignore the --datarootdir setting<br />
config.status: creating etc/Makefile<br />
config.status: WARNING:  'etc/Makefile.in' seems to ignore the --datarootdir setting<br />
config.status: creating cli/Makefile<br />
config.status: WARNING:  'cli/Makefile.in' seems to ignore the --datarootdir setting<br />
config.status: creating config.h<br />
config.status: config.h is unchanged<br />
config.status: executing depfiles commands<br />
-bash: make: command not found<br />
-bash: make: command not found<br />
<br />
Centos系统！]]></description>
			<content:encoded><![CDATA[checking for pow... yes<br />
checking for realpath... yes<br />
checking for strcasecmp... yes<br />
checking for strchr... yes<br />
checking for strdup... yes<br />
checking for strrchr... yes<br />
checking for strndup... yes<br />
checking for strtok_r... yes<br />
checking for mmap... yes<br />
checking for struct flock... yes<br />
configure: creating ./config.status<br />
config.status: creating Makefile<br />
config.status: WARNING:  'Makefile.in' seems to ignore the --datarootdir setting<br />
config.status: creating libscws/Makefile<br />
config.status: WARNING:  'libscws/Makefile.in' seems to ignore the --datarootdir setting<br />
config.status: creating etc/Makefile<br />
config.status: WARNING:  'etc/Makefile.in' seems to ignore the --datarootdir setting<br />
config.status: creating cli/Makefile<br />
config.status: WARNING:  'cli/Makefile.in' seems to ignore the --datarootdir setting<br />
config.status: creating config.h<br />
config.status: config.h is unchanged<br />
config.status: executing depfiles commands<br />
-bash: make: command not found<br />
-bash: make: command not found<br />
<br />
Centos系统！]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[安装scws-1.1.2 时 php扩展出现问题。]]></title>
			<link>http://www.hightman.cn/bbs/showthread.php?tid=802</link>
			<pubDate>Wed, 11 Aug 2010 12:18:27 +0800</pubDate>
			<guid isPermaLink="false">http://www.hightman.cn/bbs/showthread.php?tid=802</guid>
			<description><![CDATA[1) 进入源码目录的 phpext/ 目录 ( cd ~/scws-1.1.1 )<br />
2) 执行 phpize （在PHP安装目录的bin/目录下）<br />
<span style="color: #FF0000;">3) 执行 ./configure --with-scws=/usr/local/scws </span><br />
执行第3步时出现 <br />
<br />
checking for gawk... no<br />
checking for nawk... nawk<br />
checking if nawk is broken... no<br />
checking for scws support... yes, shared<br />
checking for scws_new in -lscws... no<br />
<span style="color: #FF0000;">configure: error: wrong scws lib version or lib not found</span><br />
<br />
环境： Freebsd 8.0]]></description>
			<content:encoded><![CDATA[1) 进入源码目录的 phpext/ 目录 ( cd ~/scws-1.1.1 )<br />
2) 执行 phpize （在PHP安装目录的bin/目录下）<br />
<span style="color: #FF0000;">3) 执行 ./configure --with-scws=/usr/local/scws </span><br />
执行第3步时出现 <br />
<br />
checking for gawk... no<br />
checking for nawk... nawk<br />
checking if nawk is broken... no<br />
checking for scws support... yes, shared<br />
checking for scws_new in -lscws... no<br />
<span style="color: #FF0000;">configure: error: wrong scws lib version or lib not found</span><br />
<br />
环境： Freebsd 8.0]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[scws_has_word的逻辑问题]]></title>
			<link>http://www.hightman.cn/bbs/showthread.php?tid=801</link>
			<pubDate>Thu, 29 Jul 2010 13:10:26 +0800</pubDate>
			<guid isPermaLink="false">http://www.hightman.cn/bbs/showthread.php?tid=801</guid>
			<description><![CDATA[<blockquote><cite>引用:</cite>int scws_has_word(scws_t s, char *xattr)<br />
{<br />
    int off, cnt, xmode = SCWS_NA;<br />
    scws_res_t res, cur; <br />
    char *word;<br />
    word_attr *at = NULL;   <br />
<br />
    if (!s || !s-&gt;txt)<br />
        return 0;<br />
<br />
    __PARSE_XATTR__;<br />
<br />
    // save the offset. (cnt -&gt; return_value)<br />
    off = s-&gt;off;<br />
    cnt = s-&gt;off = 0; <br />
    while (!cnt &amp;&amp; (cur = res = scws_get_result(s)) != NULL)<br />
    {    <br />
        do   <br />
        {    <br />
            /* check attribute filter */<br />
            if (at != NULL)<br />
            {    <br />
                if ((xmode == SCWS_NA) &amp;&amp; _attr_belong(cur-&gt;attr, at)) <br />
                    cnt = 1; <br />
<br />
                if ((xmode == SCWS_YEA) &amp;&amp; !_attr_belong(cur-&gt;attr, at)) <br />
                    cnt = 1; <br />
            }     <br />
        }    <br />
        while (!cnt &amp;&amp; (cur = cur-&gt;next) != NULL);<br />
        scws_free_result(res);<br />
    }    <br />
    s-&gt;off = off; <br />
    return cnt; <br />
}</blockquote>
<br />
如果xattr是NULL，返回的将会是0<br />
另外，scws_get_words返回的包括标点，不知道是否是设计的原意？]]></description>
			<content:encoded><![CDATA[<blockquote><cite>引用:</cite>int scws_has_word(scws_t s, char *xattr)<br />
{<br />
    int off, cnt, xmode = SCWS_NA;<br />
    scws_res_t res, cur; <br />
    char *word;<br />
    word_attr *at = NULL;   <br />
<br />
    if (!s || !s-&gt;txt)<br />
        return 0;<br />
<br />
    __PARSE_XATTR__;<br />
<br />
    // save the offset. (cnt -&gt; return_value)<br />
    off = s-&gt;off;<br />
    cnt = s-&gt;off = 0; <br />
    while (!cnt &amp;&amp; (cur = res = scws_get_result(s)) != NULL)<br />
    {    <br />
        do   <br />
        {    <br />
            /* check attribute filter */<br />
            if (at != NULL)<br />
            {    <br />
                if ((xmode == SCWS_NA) &amp;&amp; _attr_belong(cur-&gt;attr, at)) <br />
                    cnt = 1; <br />
<br />
                if ((xmode == SCWS_YEA) &amp;&amp; !_attr_belong(cur-&gt;attr, at)) <br />
                    cnt = 1; <br />
            }     <br />
        }    <br />
        while (!cnt &amp;&amp; (cur = cur-&gt;next) != NULL);<br />
        scws_free_result(res);<br />
    }    <br />
    s-&gt;off = off; <br />
    return cnt; <br />
}</blockquote>
<br />
如果xattr是NULL，返回的将会是0<br />
另外，scws_get_words返回的包括标点，不知道是否是设计的原意？]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[新手問題]]></title>
			<link>http://www.hightman.cn/bbs/showthread.php?tid=800</link>
			<pubDate>Thu, 29 Jul 2010 12:50:07 +0800</pubDate>
			<guid isPermaLink="false">http://www.hightman.cn/bbs/showthread.php?tid=800</guid>
			<description><![CDATA[1. 請問idf怎麼算呀?這有什麼意思?<br />
<br />
2. send_text之後,PHP中怎麼看到tf呢?<hr />
请问xdb里的tf idf是那来的计数据呢?]]></description>
			<content:encoded><![CDATA[1. 請問idf怎麼算呀?這有什麼意思?<br />
<br />
2. send_text之後,PHP中怎麼看到tf呢?<hr />
请问xdb里的tf idf是那来的计数据呢?]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[有没有添加单个或多个词的函数？]]></title>
			<link>http://www.hightman.cn/bbs/showthread.php?tid=798</link>
			<pubDate>Wed, 28 Jul 2010 18:19:20 +0800</pubDate>
			<guid isPermaLink="false">http://www.hightman.cn/bbs/showthread.php?tid=798</guid>
			<description><![CDATA[正如之前的帖子描述，scws_has_word这个函数可以用来检测非法词。当前我的项目中禁止词是放在数据库里面（为了方便增删改），如果每次加载词典都要把禁止词写到临时文件，然后添加，觉得有点过于麻烦。是否可以提供添加单个或多个词的函数？]]></description>
			<content:encoded><![CDATA[正如之前的帖子描述，scws_has_word这个函数可以用来检测非法词。当前我的项目中禁止词是放在数据库里面（为了方便增删改），如果每次加载词典都要把禁止词写到临时文件，然后添加，觉得有点过于麻烦。是否可以提供添加单个或多个词的函数？]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[PSCWS4支持文本词典实现自定义词库吗？]]></title>
			<link>http://www.hightman.cn/bbs/showthread.php?tid=797</link>
			<pubDate>Wed, 28 Jul 2010 14:40:31 +0800</pubDate>
			<guid isPermaLink="false">http://www.hightman.cn/bbs/showthread.php?tid=797</guid>
			<description><![CDATA[如题，是不是不可以呀？我没找到对应的api]]></description>
			<content:encoded><![CDATA[如题，是不是不可以呀？我没找到对应的api]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[SCWS在IIS环境无法正常加载？]]></title>
			<link>http://www.hightman.cn/bbs/showthread.php?tid=796</link>
			<pubDate>Wed, 21 Jul 2010 22:14:44 +0800</pubDate>
			<guid isPermaLink="false">http://www.hightman.cn/bbs/showthread.php?tid=796</guid>
			<description><![CDATA[我在WINDOWS XP + APACHE + PHP5环境加载正常，但在WINDOWS 2003 + IIS 6.0 + PHP5（这个配置环境正常，可以顺利运行其他PHP代码，执行MYSQL操作）却无法正常加载<br />
<br />
我在输入php -m的时候见不到scws的踪影，因正式工作环境是后者，所以想像开发者确认下是不是IIS环境不能支持？]]></description>
			<content:encoded><![CDATA[我在WINDOWS XP + APACHE + PHP5环境加载正常，但在WINDOWS 2003 + IIS 6.0 + PHP5（这个配置环境正常，可以顺利运行其他PHP代码，执行MYSQL操作）却无法正常加载<br />
<br />
我在输入php -m的时候见不到scws的踪影，因正式工作环境是后者，所以想像开发者确认下是不是IIS环境不能支持？]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[分词切分]]></title>
			<link>http://www.hightman.cn/bbs/showthread.php?tid=795</link>
			<pubDate>Wed, 21 Jul 2010 16:36:28 +0800</pubDate>
			<guid isPermaLink="false">http://www.hightman.cn/bbs/showthread.php?tid=795</guid>
			<description><![CDATA[坛主你好！<br />
    请问现在的分词有把停用词和高频词过滤掉么？看不到在那一块儿。]]></description>
			<content:encoded><![CDATA[坛主你好！<br />
    请问现在的分词有把停用词和高频词过滤掉么？看不到在那一块儿。]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[求救PSCWS4问题]]></title>
			<link>http://www.hightman.cn/bbs/showthread.php?tid=794</link>
			<pubDate>Wed, 21 Jul 2010 10:59:13 +0800</pubDate>
			<guid isPermaLink="false">http://www.hightman.cn/bbs/showthread.php?tid=794</guid>
			<description><![CDATA[这是我的代码：<br />
<div class="codeblock phpcodeblock"><div class="title">PHP 代码:<br />
</div><div class="body"><div dir="ltr"><code><span style="color: #FF8000">//&nbsp;加入头文件<br /></span><span style="color: #007700">require&nbsp;</span><span style="color: #DD0000">'pscws/pscws4.class.php'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">header</span><span style="color: #007700">(</span><span style="color: #DD0000">"Content-Type:text/html;charset=utf-8"</span><span style="color: #007700">);&nbsp;&nbsp;&nbsp;&nbsp;<br /></span><span style="color: #FF8000">//&nbsp;建立分词类对像,&nbsp;参数为字符集,&nbsp;默认为&nbsp;gbk,&nbsp;可在后面调用&nbsp;set_charset&nbsp;改变<br /></span><span style="color: #0000BB">&#36;pscws&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">PSCWS4</span><span style="color: #007700">(</span><span style="color: #DD0000">'utf-8'</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">&#36;pscws</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">set_ignore</span><span style="color: #007700">(</span><span style="color: #DD0000">'yes'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">&#36;pscws</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">set_dict</span><span style="color: #007700">(</span><span style="color: #DD0000">'E:/scws/etc/dict.utf8.xdb'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">&#36;pscws</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">set_rule</span><span style="color: #007700">(</span><span style="color: #DD0000">'E:/scws/etc/rules_cht.utf8.ini'</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">//&nbsp;分词调用&nbsp;send_text()&nbsp;将待分词的字符串传入,&nbsp;紧接着循环调用&nbsp;get_result()&nbsp;方法取回一系列分好的词<br />//&nbsp;直到&nbsp;get_result()&nbsp;返回&nbsp;false&nbsp;为止<br />//&nbsp;返回的词是一个关联数组,&nbsp;包含:&nbsp;word&nbsp;词本身,&nbsp;idf&nbsp;逆词率(重),&nbsp;off&nbsp;在text中的偏移,&nbsp;len&nbsp;长度,&nbsp;attr&nbsp;词性<br />//<br /></span><span style="color: #0000BB">&#36;text&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"中国航天官员应邀到美国与太空总署官员开会"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">&#36;pscws</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">send_text</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;text</span><span style="color: #007700">);<br />while&nbsp;(</span><span style="color: #0000BB">&#36;some&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;pscws</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">get_result</span><span style="color: #007700">())<br />{<br />&nbsp;&nbsp;&nbsp;foreach&nbsp;(</span><span style="color: #0000BB">&#36;some&nbsp;</span><span style="color: #007700">as&nbsp;</span><span style="color: #0000BB">&#36;word</span><span style="color: #007700">)<br />&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #0000BB">&#36;word</span><span style="color: #007700">[</span><span style="color: #DD0000">'word'</span><span style="color: #007700">&#93;.</span><span style="color: #DD0000">'=&gt;'</span><span style="color: #007700">.</span><span style="color: #0000BB">&#36;word</span><span style="color: #007700">[</span><span style="color: #DD0000">'attr'</span><span style="color: #007700">&#93;.</span><span style="color: #DD0000">'&lt;br&gt;'</span><span style="color: #007700">;<br /><br />&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">flush</span><span style="color: #007700">();<br />}<br /></span><span style="color: #0000BB">&#36;pscws</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">close</span><span style="color: #007700">();<br /><br /></span><span style="color: #0000BB">?&gt;</span></code></div></div></div>
<br />
<br />
网页上的显示结果却是：<br />
航天=&gt;nr<br />
?员庽&gt;nr<br />
?员=&gt;nr]]></description>
			<content:encoded><![CDATA[这是我的代码：<br />
<div class="codeblock phpcodeblock"><div class="title">PHP 代码:<br />
</div><div class="body"><div dir="ltr"><code><span style="color: #FF8000">//&nbsp;加入头文件<br /></span><span style="color: #007700">require&nbsp;</span><span style="color: #DD0000">'pscws/pscws4.class.php'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">header</span><span style="color: #007700">(</span><span style="color: #DD0000">"Content-Type:text/html;charset=utf-8"</span><span style="color: #007700">);&nbsp;&nbsp;&nbsp;&nbsp;<br /></span><span style="color: #FF8000">//&nbsp;建立分词类对像,&nbsp;参数为字符集,&nbsp;默认为&nbsp;gbk,&nbsp;可在后面调用&nbsp;set_charset&nbsp;改变<br /></span><span style="color: #0000BB">&#36;pscws&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">PSCWS4</span><span style="color: #007700">(</span><span style="color: #DD0000">'utf-8'</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">&#36;pscws</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">set_ignore</span><span style="color: #007700">(</span><span style="color: #DD0000">'yes'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">&#36;pscws</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">set_dict</span><span style="color: #007700">(</span><span style="color: #DD0000">'E:/scws/etc/dict.utf8.xdb'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">&#36;pscws</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">set_rule</span><span style="color: #007700">(</span><span style="color: #DD0000">'E:/scws/etc/rules_cht.utf8.ini'</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">//&nbsp;分词调用&nbsp;send_text()&nbsp;将待分词的字符串传入,&nbsp;紧接着循环调用&nbsp;get_result()&nbsp;方法取回一系列分好的词<br />//&nbsp;直到&nbsp;get_result()&nbsp;返回&nbsp;false&nbsp;为止<br />//&nbsp;返回的词是一个关联数组,&nbsp;包含:&nbsp;word&nbsp;词本身,&nbsp;idf&nbsp;逆词率(重),&nbsp;off&nbsp;在text中的偏移,&nbsp;len&nbsp;长度,&nbsp;attr&nbsp;词性<br />//<br /></span><span style="color: #0000BB">&#36;text&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"中国航天官员应邀到美国与太空总署官员开会"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">&#36;pscws</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">send_text</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;text</span><span style="color: #007700">);<br />while&nbsp;(</span><span style="color: #0000BB">&#36;some&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;pscws</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">get_result</span><span style="color: #007700">())<br />{<br />&nbsp;&nbsp;&nbsp;foreach&nbsp;(</span><span style="color: #0000BB">&#36;some&nbsp;</span><span style="color: #007700">as&nbsp;</span><span style="color: #0000BB">&#36;word</span><span style="color: #007700">)<br />&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #0000BB">&#36;word</span><span style="color: #007700">[</span><span style="color: #DD0000">'word'</span><span style="color: #007700">].</span><span style="color: #DD0000">'=&gt;'</span><span style="color: #007700">.</span><span style="color: #0000BB">&#36;word</span><span style="color: #007700">[</span><span style="color: #DD0000">'attr'</span><span style="color: #007700">].</span><span style="color: #DD0000">'&lt;br&gt;'</span><span style="color: #007700">;<br /><br />&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">flush</span><span style="color: #007700">();<br />}<br /></span><span style="color: #0000BB">&#36;pscws</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">close</span><span style="color: #007700">();<br /><br /></span><span style="color: #0000BB">?&gt;</span></code></div></div></div>
<br />
<br />
网页上的显示结果却是：<br />
航天=&gt;nr<br />
?员庽&gt;nr<br />
?员=&gt;nr]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[有高手帮解决初级问题吗>?]]></title>
			<link>http://www.hightman.cn/bbs/showthread.php?tid=793</link>
			<pubDate>Tue, 20 Jul 2010 19:12:40 +0800</pubDate>
			<guid isPermaLink="false">http://www.hightman.cn/bbs/showthread.php?tid=793</guid>
			<description><![CDATA[我编译后没有实现分词功能,只分字了.图片如下<br />
[attachment=1200&#93;<br />
<br />
只实现了分字,并没实现分词!!!!!<hr />
我自己找到原因了,哈哈.原来是字典没加载成功.<br />
<br />
<br />
我从这个帖子找到原因的<br />
<a href="http://www.hightman.cn/bbs/showthread.php?tid=37" target="_blank">http://www.hightman.cn/bbs/showthread.php?tid=37</a>]]></description>
			<content:encoded><![CDATA[我编译后没有实现分词功能,只分字了.图片如下<br />
[attachment=1200]<br />
<br />
只实现了分字,并没实现分词!!!!!<hr />
我自己找到原因了,哈哈.原来是字典没加载成功.<br />
<br />
<br />
我从这个帖子找到原因的<br />
<a href="http://www.hightman.cn/bbs/showthread.php?tid=37" target="_blank">http://www.hightman.cn/bbs/showthread.php?tid=37</a>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[论坛BUG]]></title>
			<link>http://www.hightman.cn/bbs/showthread.php?tid=790</link>
			<pubDate>Thu, 15 Jul 2010 01:54:34 +0800</pubDate>
			<guid isPermaLink="false">http://www.hightman.cn/bbs/showthread.php?tid=790</guid>
			<description><![CDATA[对不起撒，无意中发现的BUG，看我另外的帖子，标题导致BUG]]></description>
			<content:encoded><![CDATA[对不起撒，无意中发现的BUG，看我另外的帖子，标题导致BUG]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[【已解决】【感谢hightman帅哥的耐心解答，我是个人站长，要是我做起来了一定赞助您撒，]]></title>
			<link>http://www.hightman.cn/bbs/showthread.php?tid=789</link>
			<pubDate>Wed, 14 Jul 2010 12:40:31 +0800</pubDate>
			<guid isPermaLink="false">http://www.hightman.cn/bbs/showthread.php?tid=789</guid>
			<description><![CDATA[正确写法，官方多写了一个T吧，那个代码反正我试验是错误的！<br />
<div class="codeblock phpcodeblock"><div class="title">PHP 代码:<br />
</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&#36;cws</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">add_dict</span><span style="color: #007700">(</span><span style="color: #0000BB">ini_get</span><span style="color: #007700">(</span><span style="color: #DD0000">"scws.default.fpath"</span><span style="color: #007700">).</span><span style="color: #DD0000">'/dict.xdb'</span><span style="color: #007700">);&nbsp;<br /></span><span style="color: #0000BB">&#36;cws</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">add_dict</span><span style="color: #007700">(</span><span style="color: #DD0000">"./dict_extra.txt"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">SCWS_XDICT_TXT</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div>
<br />
在说说词分词测试：<br />
我的网址：http://sjz.haojishu.com/tools/222.php<br />
官方网址：http://www.ftphp.com/scws/demo/v48.php<br />
<br />
同时输入下边的词，大家看看：<br />
石家庄河北师大播音主持培训中心高考暑假班招生啦<br />
<br />
选项选择这些：<br />
 二元  清除标点  只看统计打钩 并写  2<br />
<br />
官方结果明显正确，为啥我安装的不一样的呢？<br />
<br />
<br />
在说第三点： 删除词条：<br />
输入：陈凯歌是个帅哥吗<br />
<br />
我限制了删除了   陈凯歌  但是实际没有效果啊，<br />
代码可以直接查看，限制词典位置在：<br />
<a href="http://sjz.haojishu.com/tools/dict_extra.txt" target="_blank">http://sjz.haojishu.com/tools/dict_extra.txt</a><br />
见鬼啊！]]></description>
			<content:encoded><![CDATA[正确写法，官方多写了一个T吧，那个代码反正我试验是错误的！<br />
<div class="codeblock phpcodeblock"><div class="title">PHP 代码:<br />
</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&#36;cws</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">add_dict</span><span style="color: #007700">(</span><span style="color: #0000BB">ini_get</span><span style="color: #007700">(</span><span style="color: #DD0000">"scws.default.fpath"</span><span style="color: #007700">).</span><span style="color: #DD0000">'/dict.xdb'</span><span style="color: #007700">);&nbsp;<br /></span><span style="color: #0000BB">&#36;cws</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">add_dict</span><span style="color: #007700">(</span><span style="color: #DD0000">"./dict_extra.txt"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">SCWS_XDICT_TXT</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div>
<br />
在说说词分词测试：<br />
我的网址：http://sjz.haojishu.com/tools/222.php<br />
官方网址：http://www.ftphp.com/scws/demo/v48.php<br />
<br />
同时输入下边的词，大家看看：<br />
石家庄河北师大播音主持培训中心高考暑假班招生啦<br />
<br />
选项选择这些：<br />
 二元  清除标点  只看统计打钩 并写  2<br />
<br />
官方结果明显正确，为啥我安装的不一样的呢？<br />
<br />
<br />
在说第三点： 删除词条：<br />
输入：陈凯歌是个帅哥吗<br />
<br />
我限制了删除了   陈凯歌  但是实际没有效果啊，<br />
代码可以直接查看，限制词典位置在：<br />
<a href="http://sjz.haojishu.com/tools/dict_extra.txt" target="_blank">http://sjz.haojishu.com/tools/dict_extra.txt</a><br />
见鬼啊！]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[如何使分词結果不包含一个單字的词?..]]></title>
			<link>http://www.hightman.cn/bbs/showthread.php?tid=788</link>
			<pubDate>Tue, 06 Jul 2010 18:29:53 +0800</pubDate>
			<guid isPermaLink="false">http://www.hightman.cn/bbs/showthread.php?tid=788</guid>
			<description><![CDATA[如題..<br />
<br />
请问如何使分词結果不包含單一个中文字的词? 不考慮词性.只要是單个中文字都不要,应該從哪里去設置最簡便?]]></description>
			<content:encoded><![CDATA[如題..<br />
<br />
请问如何使分词結果不包含單一个中文字的词? 不考慮词性.只要是單个中文字都不要,应該從哪里去設置最簡便?]]></content:encoded>
		</item>
	</channel>
</rss>