[ai_group] WordNet Demo

  • From: John Jacques <johnj_01201@xxxxxxxxx>
  • To: ai <ai_group@xxxxxxxxxxxxx>
  • Date: Sat, 13 Apr 2002 21:34:06 -0700 (PDT)

Hello, here is a little demo written in Libert Basic 3.0, should work
on previous versions too. 


Watch the line wraps....


'Change this next line to the location of WordNet executable
pathtown$="i:\wn16\bin\wn.exe"
cls
'Erase/Create an empty file in case there is no match found
open "c:\temp\tempit.txt" for output as #1
close #1    'do nothing just open and close

input "Enter a word and I'll tell you what it is ";b$
if b$="" then goto [done]
d$= pathtown$+" "+b$+" -n1 -synsn >c:\temp\tempit.txt"
run d$ 
print "Running: "+d$:Print:print

'We need to wait for the DOS prompt to complete or do not get to read
the file
'LB does not stop while the RUN command is used.
for i= 1 to 1000:for o=1 to 100:next o:next i

open "c:\temp\tempit.txt" for input as #2
[loop]
if eof(#2)=-1 then close #2: goto [done]
line input #2,A$
if left$(A$,10)="       => " then print "A "+b$+" is a
"+right$(A$,len(A$)-10)
goto [loop]

[done]
print "DONE!":end





__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/

Other related posts: