标签:
我记录财富人生证券/理财 |
分类: 股票、财经__博客张凯_unikran |
//假设a是你取出的一个字符
if asc(x)<0
else
a为汉字的一部分,继续取下一位以组成一个汉字
use zq
*该数据库2个字段:z c,254, z1, c ,254
dele all
pack
appe from
scan
b=allt(z)
for i=1 to len(b)
if asc(substr(b,i,1))>=128
qi=left(b, i-1)
qki=right(b,len(b)-i+1)
repl z with qi
repl z1 with qki
exit
endif
endfor
endscan
brow
*close all
clear
dime
for i=1
store "" to y(i)
endfor
use zq
*该数据库1个字段:z c,254
dele all
pack
appe from
pp=0
scan
b=allt(z)
if at(" ",b)=0
pp=pp+1
store
*?y(PP)
endif
do while at(" ",b)<>0
&&
pp=pp+1
jpp=at(" ",b)
*?jpp
bqq=left(b,jpp)
*?bqq
b=allt(substr(b,jpp+1,len(b)-jpp))
*?b
store
*?y(pp)
*?"ok1"
endif
if at(" ",b)=0
pp=pp+1
store
*?y(pp)
*wait
endif
enddo
*如果是字母,则继续查找,pk=1 ,
如果不是字母,也继续查找, 直到找到赋给pk=x?
*当pk<>0,说明至少有一个字母
*继续查找,如果pk1<>0
,说明存在一个字符串,将该字符串取出,赋给PPP,并直接加上网址字符串
*然后再从ppp后面重新开始找,重复上面的过程。。。
endscan
dele all
pack
for j=1 to 10
for i=1 to 10000
if
store left(y(i),len(y(i))-1) to y(i)
endif
if
store
endif
if
store
endif
if
store
endif
if
store
endif
if
store
endif
endfor
endfor
for i=1 to 10000
appe blank
repl z with y(i)
endfor
dele for len(allt(z))=0
pack
brow
*初步定稿
clear
dime
dime j(10000,2)
for i=1
store "" to y(i)
endfor
use zq
*该数据库1个字段:z c,254
dele all
pack
appe from
pp=0
scan
b=allt(z)
if at(" ",b)=0
pp=pp+1
store
*?y(PP)
endif
do while at(" ",b)<>0
&&
pp=pp+1
jpp=at(" ",b)
*?jpp
bqq=left(b,jpp)
*?bqq
b=allt(substr(b,jpp+1,len(b)-jpp))
*?b
store
*?y(pp)
*?"ok1"
endif
if at(" ",b)=0
pp=pp+1
store
*?y(pp)
*wait
endif
enddo
*如果是字母,则继续查找,pk=1 ,
如果不是字母,也继续查找, 直到找到赋给pk=x?
*当pk<>0,说明至少有一个字母
*继续查找,如果pk1<>0
,说明存在一个字符串,将该字符串取出,赋给PPP,并直接加上网址字符串
*然后再从ppp后面重新开始找,重复上面的过程。。。
endscan
dele all
pack
j=1
do while j<10
for i=1 to 10000
if
store left(y(i),len(y(i))-1) to y(i)
endif
if
store
endif
if
store
endif
if
store
endif
if
store
endif
if
store
endif
endfor
j=j+1
enddo
?"ok"
for i=1 to 10000
appe blank
repl z with y(i)
endfor
dele for len(allt(z))=0
pack
brow
for i=1
store "" to y(i)
endfor
ok=reccount()
?ok
for i=1 to ok
go i
store
endfor
use zpz3
dele all
pack
appe from
brow
po=0
for i=1 to ok
scan
if at(y(i),z)<>0 and len(y(i))>5
*5是代表词汇最少也要6位长,否则的话,由于an,to,and,the,to等词汇出现频率
*高,而且没有实际用途,因此忽略。
po=po+1
store allt(z)
*?y(i)
*?j(po,1)
store allt(y(i)) to j(po,2)
endif
endscan
endfor
dele all
pack
?po
for i=1 to po
if len(j(i,1))<>0
appe blank
repl z with j(i,1)
repl z1 with j(i,2)
endif
endfor
brow
==========
*最终定稿
USE 3
DELE ALL
PACK
USE
clear
dime
dime j(10000,2)
for i=1
store "" to y(i)
endfor
use zq
*该数据库1个字段:z c,254
dele all
pack
appe from
pp=0
scan
b=allt(z)
if at(" ",b)=0
pp=pp+1
store
*?y(PP)
endif
do while at(" ",b)<>0
&&
pp=pp+1
jpp=at(" ",b)
*?jpp
bqq=left(b,jpp)
*?bqq
b=allt(substr(b,jpp+1,len(b)-jpp))
*?b
store
*?y(pp)
*?"ok1"
endif
if at(" ",b)=0
pp=pp+1
store
*?y(pp)
*wait
endif
enddo
*如果是字母,则继续查找,pk=1 ,
如果不是字母,也继续查找, 直到找到赋给pk=x?
*当pk<>0,说明至少有一个字母
*继续查找,如果pk1<>0
,说明存在一个字符串,将该字符串取出,赋给PPP,并直接加上网址字符串
*然后再从ppp后面重新开始找,重复上面的过程。。。
endscan
dele all
pack
j=1
do while j<10
for i=1 to 10000
if
store left(y(i),len(y(i))-1) to y(i)
endif
if
store
endif
if
store
endif
if
store
endif
if
store
endif
if
store
endif
endfor
j=j+1
enddo
?"ok"
for i=1 to 10000
appe blank
repl z with y(i)
endfor
dele for len(allt(z))=0
pack
brow
for i=1
store "" to y(i)
endfor
ok=reccount()
COUNT TO JOOOOO
?JOOOOO
wait
for i=1 to ok
go i
store
endfor
use zpz3
*该库必须保存,为词汇原始库。两个字段, 均为C, 254
brow
po=0
for i=1 to ok
scan
if at(y(i),z)<>0 and len(y(i))>5
*5是代表词汇最少也要6位长,否则的话,由于an,to,and,the,to等词汇出现频率
*高,而且没有实际用途,因此忽略。
po=po+1
pok=z
POK1=Z1
use
appe blank
repl
REPL Z2
*?Z1
repl
*?Z
use zpz3
*三个字段, 均为c, 254
EXIT
endif
endscan
endfor
USE ZQ
dele all
pack
use 3
brow
list to zk.txt
*为什么最后数据库中只有561个记录呢?因为有些找不到对应记录的词汇,就没有
*显示出来
use zq
dele all
pack
appe from cihui1.xls type xls
dele for len(allt(z))<2
pack
scan
if at("?",z)<>0
repl z with stuff(z,at("?",z),1," ")
endif
endscan
brow
==================