For example, the title is: Tencent QQ2006 polyps integrated version v4.5b
After word segmentation: [This resource keyword: Tencent QQ polyps integration]
And make keywords into special topics, and you can generate related connections for each content page.
Use CSW Chinese word segmentation component
Download: http://www.vgoogle.net/Product_CSW.asp
Below is my ASP code, which is relatively simple, but practical
Codecsw gets all the word segmentation results output. There is an ASP file in the assembly. You can tell how to get word segmentation results at a glance. I won't go into details.
The code copy is as follows:
fcon=split(htm,"")
fcs=ubund(fcon)
forfci=0tofcs
iffcimod2=0then
fcn=fcn&fcon(fci)&"$fc^#$"'I use $fc^#$ to divide each word segmentation here
else
fcw=fcw&fcon(fci)&"$fc^#$"
endif
next
fcn=left(fcn,len(fcn)-12)'Remove the first $fc^#$
fcw=left(fcw,len(fcw)-6) Remove the last $fc^#$
don=split(fcn,"$fc^#$")
donn=split(fcw,"$fc^#$")
dos=ubund(don)
fordoi=0todos
fcname=don(doi)' get participle
fcsx=donn(doi)' get the word participle attribute
'The following is to judge that participle is in line with the attributes I have proposed, such as nouns, nouns, verbs, etc., excluding numerals, abacus and conjunction words.
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"then
iflen(fcname)>1then
ifinstr(fcname1,fcname&"$")then
else
iffcname<>""andfcname<>""then
fcname=replace(replace(replace(trim(fcname),chr(10),""),chr(13),""),chr(10)&chr(13),"")'Remove the word participle line break and enter key
iflen(fcname)>1then
'This is the word segmentation library. My word segmentation library has only three fields, automatic ID, word segmentation name and content ID to which word segmentation belong
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
else
rs("mid")=rs("mid")&","&id&","
endif
rs.update
rs.close
setrs=nothing
'The word participle ends
endif
endif
response.writefcname&"("&fcsx&")<br>"
mfc=mfc&fcname&","
endif
fcname1=fcname1&fcname&"$"
endif
endif
next
'Here is adding participle to the content table. In the content table, I only added one participle field mfc
ifright(mfc,1)="$"thenmfc=left(mfc,len(mfc)-1)
SetRs=CreateObject("ADODB.Recordset")