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 


Less picky @equal

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Vic D'Elfant
Past Contributor
Past Contributor


Joined: 26 Jun 2002
Posts: 673
Location: The Netherlands

PostPosted: Thu Mar 18, 2004 4:17 pm    Post subject: Less picky @equal Reply with quote

Hi everyone,

I've been trying to create a program that asks me a word, for example, in English, and I have to enter the Dutch translation, to learn tests at school Smile

The 'asking'-part works fine, but the program is kinda picky when accepting answers...
For example, if the correct answer would be 'spare time', and I entered 'spar time' (with a typo), the program says it's incorrect. Which actually is right, because I use @equal to compare the correct and the given anwer, but isn't it possible to let it be a bit less-picky, so these answers are also accepted?

I've been thinking about counting the sum of the ASCII codes of the correct answer and the sum of the ASCII codes of the given answer, and then calculate the difference, but this isn't reliable either... Confused

Thanks in advance,
Vic

_________________
phpBB Development Team
Back to top
View user's profile Send private message Visit poster's website
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Thu Mar 18, 2004 4:51 pm    Post subject: Reply with quote

Ya could try a routine with @substr() and make a few attempts
to check for partial spellings of the word. Maybe check 1/2 - 3/4
of the word length or so? Might use @pos() for this as well.

Just a thought... Wink

Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
jules
Professional Member
Professional Member


Joined: 14 Sep 2001
Posts: 1043
Location: Cumbria, UK

PostPosted: Thu Mar 18, 2004 6:52 pm    Post subject: Reply with quote

Perhaps you could spell check the string before doing the comparison? Very Happy

Is there a spell check extension for VDS?

_________________
The Tech Pro
www.tech-pro.net
Back to top
View user's profile Send private message Visit poster's website
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Fri Mar 19, 2004 8:50 am    Post subject: Reply with quote

hi vic,

i assume that you are entering somewhere along the way the correct answers for your program to check your entries against (bad english sentence this is!)...so why don't you add the mispelling that would be acceptable with a popup saying that you got part of the answer right

i would recommend parsing your answer and then checking each individual word against the correct spelling...if none are found then check it against a prepared list of acceptable spelling mistakes

does that make sense?

serge

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Protected
Valued Contributor
Valued Contributor


Joined: 02 Jan 2001
Posts: 228
Location: Portugal

PostPosted: Fri Mar 19, 2004 10:40 am    Post subject: Reply with quote

I agree with mac about the usage of @pos . It would be extremely useful in this case, allowing you to make a routine that would pick much more 'close-but-not-exactly-right' answers than if you defined them manually. I use that function all the time for this kind of stuff...
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Fri Mar 19, 2004 11:43 am    Post subject: Reply with quote

Or perhaps Vic shouldn't get into the habit of getting away with incorrect answers Wink

How 'bout a math test: 12 +12 = 25! OK, that's fairly close - correct answer... Very Happy Very Happy

If I were the professor, I'd stick with @equal() and perhaps even add the EXACT parameter Twisted Evil

Dread

_________________
~~ Alcohol and calculus don't mix... Don't drink and derive! ~~

String.DLL * advanced string processing
Back to top
View user's profile Send private message
vtol
Valued Contributor
Valued Contributor


Joined: 05 Feb 2004
Posts: 656
Location: Eastern Indiana

PostPosted: Fri Mar 19, 2004 11:00 pm    Post subject: Reply with quote

A slang list or Spellchecker extinsion sounds good..
Back to top
View user's profile Send private message Visit poster's website
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Fri Mar 19, 2004 11:25 pm    Post subject: Reply with quote

That's something that's been wanted for years. Smile
_________________
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 -> General Help 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