Rev 15179 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
11375 | bpr | 1 | type=gapfill |
13715 | obado | 2 | textarea="data words pre post" |
3 | iEdit="pre post" |
||
23 | reyssat | 4 | |
13704 | obado | 5 | :Tolerant text-to-answer questions embedded in random text. |
23 | reyssat | 6 | |
13704 | obado | 7 | This exercise presents texts with "holes", |
8 | each to be filled with a word (or a very short sentence). |
||
23 | reyssat | 9 | <p> |
13704 | obado | 10 | To build an exercise with this model, just enter the texts. |
11 | An easy syntax allows you to specify the holes |
||
12 | and the correct word that it accepts. |
||
13477 | obado | 13 | </p><p> |
13704 | obado | 14 | Answer parser ignores "small" differences in response: |
15 | absence or addition of an article, upper / lower case, |
||
17175 | bpr | 16 | accents, plural / singular.<br> |
13704 | obado | 17 | It may also not count typing errors as a false answer. |
18 | Synonyms can also be declared. |
||
13477 | obado | 19 | </p><p class="wims_credits"> |
15179 | lemaire | 20 | Author of the model: <a href="mailto:qualite@wimsedu.info">Gang Xiao</a> |
13477 | obado | 21 | </p> |
23 | reyssat | 22 | |
23 | :%%%%%%%%%%%%%%%%% ATTENTION %%%%%%%%%%%%%%%%%%%% |
||
24 | |||
25 | Remove the above header if you destroy the model tags! (The lines starting |
||
26 | with a ':'.) Otherwise the exercise might not be taken back by Createxo. |
||
27 | |||
28 | :%%%%%%%% Example parameters to be redefined %%%%%%%%%%%%%%%%% |
||
29 | |||
13704 | obado | 30 | :\title{Textual questions} |
5608 | bpr | 31 | :\author{XIAO, Gang} |
8002 | bpr | 32 | :\email{qualite@wimsedu.info} |
5724 | bpr | 33 | :\credits{} |
23 | reyssat | 34 | |
13704 | obado | 35 | :Width of input boxes. The longest answers must be anticipated. |
23 | reyssat | 36 | \integer{len=20} |
37 | |||
38 | :Main data. |
||
13704 | obado | 39 | <p>Define one question per line, and separate the lines with a semicolon. |
40 | (So the texts themselves can not contain semi-colons.)</p><p> |
||
41 | The question to ask must be put between a pair of |
||
42 | double-question mark "??".</p><p> |
||
43 | You can ask up to 6 questions in one sentence. |
||
44 | If a question accepts several correct answers, |
||
45 | put all the correct answers (synonyms) separated by a vertical line |
||
46 | <span class="tt wims_code_words">|</span>.</p><p> |
||
47 | The analyzer does not account for small differences in response: |
||
48 | absence or addition of an article, upper / lower case, |
||
49 | accents, plural / singular.</p> |
||
23 | reyssat | 50 | $embraced_randitem |
51 | \text{data= |
||
13704 | obado | 52 | the basic unit for measuring an intensity is ??ampere??.; |
53 | the basic unit for measuring a voltage is ??volt??.; |
||
54 | the basic unit for measuring resistance is ??ohm??.; |
||
55 | the basic unit for measuring the capacitance of a capacitor is ??farad??.; |
||
56 | the basic unit for measuring the inductance of a solenoid is ??henry??.; |
||
57 | the basic unit for measuring the dissipated power on a component is ??watt??.; |
||
58 | the basic unit for measuring a frequency is ??hertz??.; |
||
23 | reyssat | 59 | |
13704 | obado | 60 | Ampere is a unit of measure for the ??intensity??.; |
61 | Volt is a unit of measure for the ??voltage|load??.; |
||
62 | Ohm is a unit of measure for ??resistance??.; |
||
63 | Watt is a unit of measure for the ??power??.; |
||
23 | reyssat | 64 | } |
65 | |||
13704 | obado | 66 | :Type of response analysis |
67 | The types <span class="tt">case</span> and <span class="tt">nocase</span> are especially suitable for |
||
68 | linguistic applications. In other cases, prefer <span class="tt">atext</span>. |
||
69 | \text{atype=item(3,case (no error tolerance), |
||
70 | nocase (tolerate lowercase / uppercase), |
||
5608 | bpr | 71 | atext (ignore pluriel/singulier et articles))} |
72 | |||
13704 | obado | 73 | :List of recognized words. |
74 | <p>Put the recognized words in the list. |
||
75 | Any answer containing a word outside this list will be considered a typo |
||
76 | and returned to retype.</p><p> |
||
77 | If this field is empty, any unrecognized response is considered false. |
||
78 | This should be the case in general for language applications. |
||
23 | reyssat | 79 | \text{words= |
13704 | obado | 80 | electrical electricity circuit component intensity current voltage load |
81 | resistor resistance capacitor transistor solenoid capacitance |
||
82 | inductance power frequency hertz |
||
23 | reyssat | 83 | } |
84 | |||
13704 | obado | 85 | :Text displayed before the question. HTML tags allowed. Can be empty. |
23 | reyssat | 86 | $embraced_randitem |
13704 | obado | 87 | \text{pre=In electricity,} |
23 | reyssat | 88 | |
13704 | obado | 89 | :Text displayed after the question. HTML tags allowed. Can be empty. |
23 | reyssat | 90 | $embraced_randitem |
91 | \text{post=} |
||
92 | |||
11544 | obado | 93 | :Embraced random items |
8512 | bpr | 94 | $embraced_randitem |
95 | \text{accolade=item(1,1 yes, |
||
96 | 2 no)} |
||
97 | |||
23 | reyssat | 98 | :%%%%%%%%%%%%%% Nothing to modify before the statement %%%%%%%%%%%%%%%% |
99 | |||
8512 | bpr | 100 | \text{accolade=wims(word 1 of \accolade)} |
23 | reyssat | 101 | \text{data=wims(singlespace \data)} |
102 | \text{data=wims(nonempty rows \data)} |
||
103 | \text{data=randomrow(\data)} |
||
8512 | bpr | 104 | \text{data=\accolade=1 ?wims(embraced randitem \data)} |
23 | reyssat | 105 | \text{data=slib(text/cutchoice2 \data)} |
106 | \integer{qs=floor(rows(\data)/2)} |
||
107 | \text{words=wims(trim \words)} |
||
5608 | bpr | 108 | \text{atype=wims(word 1 of \atype)} |
23 | reyssat | 109 | |
8512 | bpr | 110 | \text{pre=\accolade=1 ?wims(embraced randitem \pre)} |
111 | \text{post=\accolade=1 ?wims(embraced randitem \post)} |
||
23 | reyssat | 112 | \text{qlist=wims(makelist reply x for x=1 to \qs)} |
113 | \steps{\qlist} |
||
114 | |||
115 | :%%%%%%%%%%%%% Now the statement in html. %%%%%%%%%%%%%%%%%%%% |
||
116 | |||
117 | ::You don't need to modify this in general. |
||
118 | |||
119 | \statement{\pre |
||
120 | \data[1;] |
||
121 | \for{k=1 to \qs}{ |
||
122 | \embed{r \k,\len} \data[2*\k+1;] |
||
123 | } |
||
124 | \post |
||
125 | } |
||
126 | |||
127 | :%%%%%%%%%%%%% Nothing to modify after. %%%%%%%%%%%%%%%%%5 |
||
128 | |||
13704 | obado | 129 | \answer{Field 1}{\data[2;];\words}{type=\atype} |
130 | \answer{Field 2}{\data[4;];\words}{type=\atype} |
||
131 | \answer{Field 3}{\data[6;];\words}{type=\atype} |
||
132 | \answer{Field 4}{\data[8;];\words}{type=\atype} |
||
133 | \answer{Field 5}{\data[10;];\words}{type=\atype} |
||
134 | \answer{Field 6}{\data[12;];\words}{type=\atype} |
||
23 | reyssat | 135 |