Day 8b. Using PMatch for short-answer free-text questions. As promised, what I’d like to do is to give you an example of the answer matching for a real question, based on real student responses.
The question is given below and the answer matching rules are copied at the end of this post. I have removed most of the rules, to give greater emphasis to those that remain.
The vast majority of correct responses are matched by Rule 21, shown in red. This matches responses which talk about the child being at the bottom or end of the slide (or lots of synonyms).
The problem is that some responses talk about a child being at the ‘top or bottom’ of the slide (as shown in the screenshot of the question) and some talk about the child being at the bottom of a swing not a slide! I don’t want to mark either of those as correct, but if we started by looking for the word ‘bottom’ both would be. So the first few rules (Rule 16 and Rule 20 are shown) deal with this sort of thing, giving targeted feedback when appropriate.
Once we have dealt with these situations and correct answers including the word ‘bottom’, ‘end’ etc. etc. (and another couple of rules for correct answers) the final set of rules (two are shown) give targeted feedback for specific errors. Note that the matching for ‘top’, without proximity to ‘and’ or ‘or’, is here – we wouldn’t want to rule out all answers that used the word ‘top’ before giving credit for the word ‘bottom’. For example, a student might say ‘The kinetic energy increases as the child slides from the top to the bottom of the slide, and is a maximum at the bottom’.
If none of these rules are fired, then Rule 99, at the end, causes the general feedback to be given.
To help you understand the rules, note that ‘m’ allows a certain amount of misspelling, ‘w’ allows extra words, ‘p0’ [that’s a zero!] means the words must be next to each other (p1, p2 etc would indicate proximity of no more than one, two words etc.), ‘o’ [letter oh] means that matched words can be in any order. It really is that simple, though note how important it is to get the order of the rules right.
Here are the rules discussed above:
else if (m.match(“mw”,”swing”)){
matchMark = 0; whichMatch = 16; showOnFirstFeedback = true;
feedback = “Note that this question is about a child on a slide not a swing.\n” +
“You may find it helpful to think about the energy conversions that take place as “ +
“the boy climbs up the slide and then slides down it. Energy conversions are discussed “ +
“in Book 3 Chapter 2. ” +
“Alternatively, you know that from Book 3 Section 3.1 that the boy\’s kinetic energy “ +
“will be a maximum at the point when his speed is greatest. Where is this?”;
}
else if (m.match(“wp0″,”top_[and|or]”)){
matchMark = 0; whichMatch = 20;
feedback = “You need to be more precise in your answer. You may find it helpful to think “ +
“about the energy conversions that take place as the boy climbs up the slide and then “ +
“slides down it. Energy conversions are discussed in Book 3 Chapter 2. ” +
“Alternatively, you know that from Book 3 Section 3.1 that the boy\’s kinetic energy “ +
“will be a maximum at the point when his speed is greatest. Where is this?”;
}
else if (m.match(“mw”, “bottom|base|end|flat&|floor|ground|horizont&|level|lowest”)) {
matchMark = 1; whichMatch = 21;
feedback = “”;
}
else if (m.match(“w”, “top”)) {
matchMark = 0; whichMatch = 51;
feedback = “The boy\’s gravitational potential energy will be a maximum at the top of “ +
“the slide, but his kinetic energy will be a minimum there (and zero if he stops “ +
“moving).\n”+
“You may find it helpful to think about the energy conversions that take place as “ +
“the boy climbs up the slide and then slides down it. Energy conversions are discussed “ +
“in Book 3 Chapter 2. ” +
“Alternatively, you know that from Book 3 Section 3.1 that the boy\’s kinetic energy “ +
“will be a maximum at the point when his speed is greatest. Where is this?”;
}
else if (m.match(“wm”, “fast&|quick&”)) {
matchMark = 0; whichMatch = 53;showOnFirstFeedback = true;
feedback = “You are correct to say that the boy\’s kinetic energy will be a maximum when “ +
“he is moving at the fastest speed, but where will this be? “+
“You may find it helpful to think about the energy conversions that take place as “ +
“the boy climbs up the slide and then slides down it. Energy conversions are discussed “ +
“in Book 3 Chapter 2.”;
}
else {
matchMark = 0; whichMatch = 99;
feedback = “”;