たとえば、タイトルは次のとおりです。TencentQQ2006Polyps Integratedバージョンv4.5b
単語セグメンテーションの後:[このリソースキーワード:Tencent QQ Polyps統合]
キーワードを特別なトピックに作成すると、各コンテンツページに関連する接続を生成できます。
CSW中国語の単語セグメンテーションコンポーネントを使用します
ダウンロード:http://www.vgoogle.net/product_csw.asp
以下は私のASPコードです。比較的簡単ですが、実用的です
Codecswは、すべての単語セグメンテーション結果出力を取得します。アセンブリにASPファイルがあります。単語セグメンテーションの結果を一目で取得する方法を知ることができます。詳細は説明しません。
コードコピーは次のとおりです。
fcon = split(htm、 "")
fcs = ubund(fcon)
forfci = 0tofcs
iffcimod2 = 0then
fcn = fcn&fcon(fci)& "$ fc^#$" '$ fc^#$を使用して、各単語セグメンテーションをここに分割します
それ以外
fcw = fcw&fcon(fci)& "$ fc^#$"
endif
次
fcn = left(fcn、len(fcn)-12) '最初の$ fc^#$を削除します
fcw = left(fcw、len(fcw)-6)最後の$ fc^#$を削除します
don = split(fcn、 "$ fc^#$")
donn = split(fcw、 "$ fc^#$")
dos = ubund(don)
fordoi = 0todos
fcname = don(doi) '分詞を取得します
fcsx = donn(doi) 'word分詞属性を取得します
「以下は、分詞が、数字、アバクス、接続詞を除く名詞、名詞、動詞など、私が提案した属性と一致していることを判断するためです。
iffcsx = "/b" orfcsx = "/nz" orfcsx = "/n" orfcsx = "/an" orfcsx = "/nx" orfcsx = "/f" orfcsx = "/i" orfcsx = "/l"/"orfcsx ="/" ng "orfcsx ="/nr "orfcsx ="/nns "orfcsx ="/nt "orfcsx ="/nz "orfcsx ="/v "orfcsx ="/vn "orfcsx ="/s "orfcsx ="/g "
iflen(fcname)> 1then
ifinstr(fcname1、fcname& "$")then
それ以外
iffcname <> "" andfcname <> "" then
fcname = cheplace(falling(leptle(fcname)、chr(10)、 "")、chr(13)、 "")、chr(10)&chr(13)、 "") '単語分詞の破損を削除してキーを入力します
iflen(fcname)> 1then
「これはセグメンテーションライブラリという言葉です。私の単語セグメンテーションライブラリには、自動ID、単語セグメンテーション名、コンテンツIDの3つのフィールドのみがあります。
setrs = createObject( "adodb.recordset")
sql = "selecttop1*fromfcwherefcname = '"&fcname& "'"
rs.opensql、conn、1,3
ifrs.eofthen
rs.addnew
endif
rs( "fcname")= fcname
ifinstr(rs( "mid")、 "、"&id& "、")then
それ以外
rs( "mid")= rs( "mid")& "、"&id& "、"
endif
rs.update
rs.close
setrs =何もない
'分詞という言葉は終わります
endif
endif
Response.writefcname& "("&fcsx& ")<br>"
MFC = MFC&FCNAME& "、"
endif
fcname1 = fcname1&fcname& "$"
endif
endif
次
「ここにコンテンツテーブルに分詞を追加しています。コンテンツテーブルで、私は1つの分詞フィールドMFCのみを追加しました
ifright(mfc、1)= "$" thenmfc = left(mfc、len(mfc)-1)
setrs = createObject( "adodb.recordset")