Spelling Test
-
I´m making a C# spelling test. I´m having trouble with the grading process. My idea is not having a spell check but rather compare two texts and count the errors. One text is hidden of course. How would you think the easiest way to do this would be?
-
I´m making a C# spelling test. I´m having trouble with the grading process. My idea is not having a spell check but rather compare two texts and count the errors. One text is hidden of course. How would you think the easiest way to do this would be?
Out of curiosity, how will the user know what words she is supposed to spell for the test?
-
Out of curiosity, how will the user know what words she is supposed to spell for the test?
-
Out of curiosity, how will the user know what words she is supposed to spell for the test?
Oh, I forgot to mention. A mp3 file will be played where the text is read out. But do you have any ideas on what the easiest way to do this would be?
-
I´m making a C# spelling test. I´m having trouble with the grading process. My idea is not having a spell check but rather compare two texts and count the errors. One text is hidden of course. How would you think the easiest way to do this would be?
Use character arrays for the strings and check each character. You need to decide if you give points for a correct word with different length and handle that scenario. correct answer: hyperbole user enetered: hyperboole The lengths are different so a straight char comparison won't work. You should probably search the rest of the entered text for the char. Good luck as there's plenty of ways you can give points.
-
Use character arrays for the strings and check each character. You need to decide if you give points for a correct word with different length and handle that scenario. correct answer: hyperbole user enetered: hyperboole The lengths are different so a straight char comparison won't work. You should probably search the rest of the entered text for the char. Good luck as there's plenty of ways you can give points.
why would you do a char by char comparison instead of just comparing the strings? I misunderstood... I didn't realize this was more than a "right" or "wrong" problem... :-O
if (string.Equals(sUserAnswer, sCorrectAnswer, StringComparison.OrdinalIgnoreCase)) { // code for a right answer } else { // code for a wrong answer }
I suggest that you create an XML file that specifies the word to spell along with the location of the media file that corresponds to the spoken word. Something like: <words> <word media="C:\Words\Hello.mp3">Hello</word> <word media="C:\Words\Hyperbole.mp3">Hyperbole</word> ... </words> The application should then allow you to load the XML file that corresponds to the test you want to take.modified on Thursday, April 17, 2008 4:37 PM
-
why would you do a char by char comparison instead of just comparing the strings? I misunderstood... I didn't realize this was more than a "right" or "wrong" problem... :-O
if (string.Equals(sUserAnswer, sCorrectAnswer, StringComparison.OrdinalIgnoreCase)) { // code for a right answer } else { // code for a wrong answer }
I suggest that you create an XML file that specifies the word to spell along with the location of the media file that corresponds to the spoken word. Something like: <words> <word media="C:\Words\Hello.mp3">Hello</word> <word media="C:\Words\Hyperbole.mp3">Hyperbole</word> ... </words> The application should then allow you to load the XML file that corresponds to the test you want to take.modified on Thursday, April 17, 2008 4:37 PM
My idea was to have a test where the student or who ever is taking the test, would listen to a mp3 file. I was thinking about having the mp3 played on an external player. It is a block of text, so I´m thinking is it possible to compare two sentences? Could any of you guys show me some example of how this is done?
modified on Thursday, April 17, 2008 3:49 PM
-
My idea was to have a test where the student or who ever is taking the test, would listen to a mp3 file. I was thinking about having the mp3 played on an external player. It is a block of text, so I´m thinking is it possible to compare two sentences? Could any of you guys show me some example of how this is done?
modified on Thursday, April 17, 2008 3:49 PM
Of course it's possible to compare two sentences. A sentence is just a string, right? But how will comparing sentences solve your problem? The user will be spelling words, not sentences, right? Don't start solving the wrong problem! I think you need to take a step back and think about what you're trying to do. Spend some time with paper and pencil and sketch out some use-cases. This will help you conceptualize the problem. For example, what do you want the user experience to be? Pretend that you are going to take a spelling test. How would you expect the application to behave? Once you jot down the basic use case, start considering edge cases. For example, what if I decide to change my answer after I've already typed it in? Will the words be checked immediately after they are entered? Or will they be checked all at once when the user "finishes" the test? If the audio is not associated with the words in your program, how will you know which word the user was trying to spell? What if the user spells the words in the wrong order (the application expected them to spell "Hello" then "Hyperbole" but they spelled "Hyperbole" then "Hello")? Going through the use cases will help you conceptualize the problem and prevent you from being short-sighted in your solution. Good luck!
-
Of course it's possible to compare two sentences. A sentence is just a string, right? But how will comparing sentences solve your problem? The user will be spelling words, not sentences, right? Don't start solving the wrong problem! I think you need to take a step back and think about what you're trying to do. Spend some time with paper and pencil and sketch out some use-cases. This will help you conceptualize the problem. For example, what do you want the user experience to be? Pretend that you are going to take a spelling test. How would you expect the application to behave? Once you jot down the basic use case, start considering edge cases. For example, what if I decide to change my answer after I've already typed it in? Will the words be checked immediately after they are entered? Or will they be checked all at once when the user "finishes" the test? If the audio is not associated with the words in your program, how will you know which word the user was trying to spell? What if the user spells the words in the wrong order (the application expected them to spell "Hello" then "Hyperbole" but they spelled "Hyperbole" then "Hello")? Going through the use cases will help you conceptualize the problem and prevent you from being short-sighted in your solution. Good luck!
I have some use cases. How would you do this?
-
I have some use cases. How would you do this?
Show me one of your use-cases and I'll be glad to help you think through this.
-
I´m making a C# spelling test. I´m having trouble with the grading process. My idea is not having a spell check but rather compare two texts and count the errors. One text is hidden of course. How would you think the easiest way to do this would be?
-
I´m making a C# spelling test. I´m having trouble with the grading process. My idea is not having a spell check but rather compare two texts and count the errors. One text is hidden of course. How would you think the easiest way to do this would be?
Hi, seems to me you need to: - split both texts into words (split on spaces and puctuation); - match the words (resync when a word is missing in one of the texts); - count the differences (each pair of matching words that are not identical count as one mistake). Why match words: the sucker under test may connect two words, split a word in two, just forget one, etc. remaining problems: - punctuation: do you check those chars too? can you hear the difference between say a semi-colon and a period? - capitals: are the rules strict in your language? is it the same for the first letter following a semi-colon and a period? :)
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips: - before you ask a question here, search CodeProject, then Google; - the quality and detail of your question reflects on the effectiveness of the help you are likely to get; - use PRE tags to preserve formatting when showing multi-line code snippets.