forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Downloadable Dictionary

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Miscellaneous
View previous topic :: View next topic  
Author Message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Mon Feb 17, 2003 3:52 pm    Post subject: Downloadable Dictionary Reply with quote

For those of you who have wanted to have dictionary capabilities in
Visual DialogScript, this might solve your problems.

I found a downloadable dictionary which is in HTML format, with definitions
in the following format:

Quote:
Progress (n.) A moving or going forward; a proceeding onward; an advance


It would be nice to be able to transform the files into a format like:
Progress|n.|A moving or going forward; a proceeding onward; an advance
so that it could be easily parsed by VDS.

Right now I have no knowledge on how to transform it Crying or Very sad , but I think
it could be useful in the furture.

Download page:
http://www.translatum.gr/dictionaries/download-english.htm

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Mon Feb 17, 2003 4:06 pm    Post subject: Reply with quote

UPDATE: I have found a way to transform the files into plain text and
parsable by VDS. Very Happy Very Happy

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Mon Feb 17, 2003 5:08 pm    Post subject: Reply with quote

Here's how to use it with VDS:

Create a VDS script or use a program like WordPad to find and replace
the following strings:

Find: <p><b> Replace with: [nothing]
Find: </p> Replace with: [nothing]
Find: </b> (<I> Replace with: |
Find: </I>) Replace with: |

After you have converted the files to plain-text, rename them to the
letter of the alphabet that corresponds with the first letter of the definitions.

Then you can use the script below or something like it to find the words:

Code:
directory change,@path(%0)
%%target = apple
list create,1
list loadfile,1,a.txt
%x = 0
GOSUB Search
info Word: %%word@cr()Part of Speech: %%pos@cr()Definition: %%def
exit

:Search
repeat
list seek,1,%x
parse "%%word;%%pos;%%def",@item(1)
if @equal(%%word,%%target)
exit
end
%x = @succ(%x)
until @equal(%x, @count(1))
warn Word not in dictionary!
stop

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Tue Feb 18, 2003 6:40 am    Post subject: Reply with quote

You could've just made a VDS script to parse the html into a text csv.

But nooooo, you had to take the easy way out and use a stupid
text editor for the "Find/Replace" feature! How can you call yourself
a programmer, let alone a VDS Programmer!!! Twisted Evil

-Garrett
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Tue Feb 18, 2003 2:41 pm    Post subject: Reply with quote

I'm too "lazy" to code a script to do it. Razz Rolling Eyes Wink

No, really, it never even occurred to me to strip the HTML from the
files. I'm not through with converting them, and I think I'll code a script
to do the work for me today. I'm sure it will go a lot faster. Wink

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Miscellaneous All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group