-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdata.py
33 lines (29 loc) · 1.04 KB
/
data.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
from pydantic import BaseModel
from typing import List, Optional
class ShortAnswerInstance(BaseModel):
"""
A single short answer instance, containing all the context needed to evaluate it.
Attributes
----------
taskId : str
a string representing the task this answer was produced in
itemId : str
a string representing the item this answer was produced for
itemPrompt : str
the prompt string (question) the answer was given in response for
itemTargets : List[str]
a list of correct reference answers for the current item
learnerId: str
a string identifying the learner who gave the answer
answer: str
the answer string itself
label: Optional[str]
an optional label expressing the classification (e.g. correct/incorrect) for this answer, needed for training (manual) and produced by prediction (automatic)
"""
taskId: str
itemId: str
itemPrompt: str
itemTargets: List[str]
learnerId: str
answer: str
label: Optional[str]