feat: add stage 1 and 2 validation tests
This commit is contained in:
parent
4fa3073412
commit
4a842140b9
5 changed files with 536 additions and 0 deletions
170
data-pipeline/tests/fixtures/annotated.fixture.json
vendored
Normal file
170
data-pipeline/tests/fixtures/annotated.fixture.json
vendored
Normal file
|
|
@ -0,0 +1,170 @@
|
|||
[
|
||||
{
|
||||
"_fixture": "noun_with_cefr_vote",
|
||||
"source_id": "ili:i100955",
|
||||
"pos": "noun",
|
||||
"translations": { "en": ["grain"], "de": ["Korn", "Kornbrand"] },
|
||||
"glosses": { "en": ["a cereal grass"], "de": ["ein Getreidegras"] },
|
||||
"examples": {
|
||||
"en": [
|
||||
{ "text": "wheat is a grain that is grown in Kansas", "source": "omw" }
|
||||
]
|
||||
},
|
||||
"votes": { "en": { "grain": { "cefr_source": "B1" } } }
|
||||
},
|
||||
{
|
||||
"_fixture": "verb_no_votes_no_translations",
|
||||
"source_id": "ili:i21779",
|
||||
"pos": "verb",
|
||||
"translations": { "en": ["respire"] },
|
||||
"glosses": {
|
||||
"en": [
|
||||
"undergo the biomedical and metabolic processes of respiration by taking up oxygen and producing carbon monoxide"
|
||||
]
|
||||
},
|
||||
"examples": {},
|
||||
"votes": {}
|
||||
},
|
||||
{
|
||||
"_fixture": "verb_with_cefr_vote_all_languages",
|
||||
"source_id": "ili:i21778",
|
||||
"pos": "verb",
|
||||
"translations": {
|
||||
"en": ["breathe", "take a breath", "respire", "suspire"],
|
||||
"it": ["respirare"],
|
||||
"es": ["aspirar", "respirar"],
|
||||
"de": ["Luft holen", "hauchen", "Luft bekommen", "Luft kriegen", "atmen"],
|
||||
"fr": ["inspirer", "respirer"]
|
||||
},
|
||||
"glosses": {
|
||||
"en": ["draw air into, and expel out of, the lungs"],
|
||||
"de": ["Luft in die Lunge saugen und aus ihr ausstoßen"]
|
||||
},
|
||||
"examples": {
|
||||
"en": [
|
||||
{
|
||||
"text": "I can breathe better when the air is clean",
|
||||
"source": "omw"
|
||||
},
|
||||
{ "text": "The patient is respiring", "source": "omw" }
|
||||
]
|
||||
},
|
||||
"votes": { "en": { "breathe": { "cefr_source": "A1" } } }
|
||||
},
|
||||
{
|
||||
"_fixture": "adjective_all_languages_multiple_translations",
|
||||
"source_id": "ili:i10007",
|
||||
"pos": "adjective",
|
||||
"translations": {
|
||||
"en": ["possible"],
|
||||
"it": [
|
||||
"attuabile",
|
||||
"effettuabile",
|
||||
"eseguibile",
|
||||
"fattibile",
|
||||
"operabile",
|
||||
"possibile",
|
||||
"producibile",
|
||||
"realizzabile"
|
||||
],
|
||||
"es": ["posible"],
|
||||
"de": [
|
||||
"möglich",
|
||||
"denkbar",
|
||||
"eventuell",
|
||||
"möglicherweise",
|
||||
"allfällig",
|
||||
"etwaig",
|
||||
"gegebenenfalls",
|
||||
"eventuell"
|
||||
],
|
||||
"fr": ["possible", "éventuel"]
|
||||
},
|
||||
"glosses": {
|
||||
"en": ["capable of happening or existing"],
|
||||
"de": ["in der Lage, zu geschehen oder zu existieren"]
|
||||
},
|
||||
"examples": {
|
||||
"en": [
|
||||
{ "text": "a breakthrough may be possible next year", "source": "omw" },
|
||||
{ "text": "anything is possible", "source": "omw" },
|
||||
{ "text": "warned of possible consequences", "source": "omw" }
|
||||
]
|
||||
},
|
||||
"votes": { "en": { "possible": { "cefr_source": "A2" } } }
|
||||
},
|
||||
{
|
||||
"_fixture": "adjective_multiple_de_votes_cefr_examples",
|
||||
"source_id": "ili:i10000",
|
||||
"pos": "adjective",
|
||||
"translations": {
|
||||
"en": ["negative"],
|
||||
"de": [
|
||||
"dürftig",
|
||||
"zu wünschen übrig lassen",
|
||||
"schlecht",
|
||||
"widrig",
|
||||
"ungut",
|
||||
"lausig",
|
||||
"negativ",
|
||||
"von Nachteil",
|
||||
"schädlich",
|
||||
"nachteilig",
|
||||
"ungünstig"
|
||||
],
|
||||
"fr": ["négatif", "strictement négatif"]
|
||||
},
|
||||
"glosses": { "en": ["less than zero"], "de": ["kleiner als Null"] },
|
||||
"examples": {
|
||||
"en": [{ "text": "a negative number", "source": "omw" }],
|
||||
"de": [
|
||||
{ "text": "Die Beweise waren dürftig.", "source": "cefr" },
|
||||
{ "text": "Das Wetter ist heute schlecht.", "source": "cefr" },
|
||||
{
|
||||
"text": "Trotz widriger Umstände haben sie es geschafft.",
|
||||
"source": "cefr"
|
||||
},
|
||||
{
|
||||
"text": "Er hatte ein ungutes Gefühl bei der Sache.",
|
||||
"source": "cefr"
|
||||
},
|
||||
{ "text": "Er hat eine sehr negative Einstellung.", "source": "cefr" },
|
||||
{
|
||||
"text": "Rauchen ist schädlich für die Gesundheit.",
|
||||
"source": "cefr"
|
||||
},
|
||||
{
|
||||
"text": "Diese Entscheidung könnte nachteilig sein.",
|
||||
"source": "cefr"
|
||||
},
|
||||
{
|
||||
"text": "Das Wetter ist heute ungünstig für einen Ausflug.",
|
||||
"source": "cefr"
|
||||
}
|
||||
]
|
||||
},
|
||||
"votes": {
|
||||
"de": {
|
||||
"dürftig": { "cefr_source": "C1" },
|
||||
"schlecht": { "cefr_source": "A1" },
|
||||
"widrig": { "cefr_source": "C1" },
|
||||
"ungut": { "cefr_source": "B2" },
|
||||
"negativ": { "cefr_source": "A2" },
|
||||
"schädlich": { "cefr_source": "B1" },
|
||||
"nachteilig": { "cefr_source": "B1" },
|
||||
"ungünstig": { "cefr_source": "B2" }
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"_fixture": "adverb_no_votes",
|
||||
"source_id": "ili:i18157",
|
||||
"pos": "adverb",
|
||||
"translations": { "en": ["a cappella"], "es": ["a capella"] },
|
||||
"glosses": { "en": ["without musical accompaniment"] },
|
||||
"examples": {
|
||||
"en": [{ "text": "they performed a cappella", "source": "omw" }]
|
||||
},
|
||||
"votes": {}
|
||||
}
|
||||
]
|
||||
4
data-pipeline/tests/fixtures/conflicts.fixture.json
vendored
Normal file
4
data-pipeline/tests/fixtures/conflicts.fixture.json
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
[
|
||||
{ "word": "macht", "pos": "noun", "language": "de", "levels": ["A2", "B1"] },
|
||||
{ "word": "bleiche", "pos": "noun", "language": "de", "levels": ["B2", "B1"] }
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue