Commit c4f87720 authored by Konstantin Schulz's avatar Konstantin Schulz
Browse files

vocabulary check: intelligent adaptation of text passages may now be disabled

parent ddf4d958
{
"name": "mc_frontend",
"version": "1.2.1",
"version": "1.2.5",
"author": "Ionic Framework",
"homepage": "https://ionicframework.com/",
"scripts": {
......
......@@ -368,8 +368,10 @@ export class TestPage implements OnDestroy, OnInit {
HelperService.currentError = null;
HelperService.isLoading = true;
const formData = new FormData();
formData.append('learning_result', JSON.stringify(Object.keys(this.vocService.currentTestResults).map(
i => this.vocService.currentTestResults[i].statement)));
// tslint:disable-next-line:prefer-const
let learningResult: object = {};
Object.keys(this.vocService.currentTestResults).forEach(i => learningResult[i] = this.vocService.currentTestResults[i].statement);
formData.append('learning_result', JSON.stringify(learningResult));
this.http.post(fileUrl, formData).subscribe(async () => {
HelperService.isLoading = false;
this.wasDataSent = true;
......
......@@ -55,16 +55,6 @@
</label>
</ion-col>
</ion-row>
<!--<ion-row>-->
<!--<ion-col>-->
<!--<ion-label>{{ 'VOCABULARY_MATCHING_PERCENTAGE_WANTED' | translate }}</ion-label>-->
<!--<ion-range min="0" max="100" [(ngModel)]="vocService.desiredMatchingPercentage" color="primary"-->
<!--pin="true">-->
<!--<ion-label range-left>0</ion-label>-->
<!--<ion-label range-right>100</ion-label>-->
<!--</ion-range>-->
<!--</ion-col>-->
<!--</ion-row>-->
<ion-row>
<ion-col>
<label>
......@@ -73,6 +63,14 @@
</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<label>
<input type="checkbox" [(ngModel)]="adaptPassages"/>
<span class="checkbox">{{ "VOCABULARY_CHECK_ADAPT_PASSAGES" | translate}}</span>
</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<ion-button (click)="checkVocabulary().then()">{{ 'VOCABULARY_CHECK' | translate }}</ion-button>
......
......@@ -20,9 +20,10 @@ export class VocabularyCheckPage implements AfterViewInit {
ObjectKeys = Object.keys;
VocabularyCorpus = VocabularyCorpus;
VocabularyCorpusTranslation = VocabularyCorpusTranslation;
invalidQueryCorpusString: string;
public adaptPassages = true;
public currentCorpusString: string;
public currentRankingUnits: Sentence[][];
public invalidQueryCorpusString: string;
constructor(public navCtrl: NavController,
public vocService: VocabularyService,
......@@ -101,11 +102,13 @@ export class VocabularyCheckPage implements AfterViewInit {
const lastIndex: number = this.currentRankingUnits.length - 1;
if (this.currentRankingUnits[lastIndex].length < this.vocService.desiredSentenceCount) {
this.currentRankingUnits[lastIndex].push(sent);
} else if (this.currentRankingUnits[lastIndex][0].matching_degree < sent.matching_degree) {
this.currentRankingUnits[lastIndex].splice(0, 1);
this.currentRankingUnits[lastIndex].push(sent);
} else {
this.currentRankingUnits.push([sent]);
if (this.adaptPassages && this.currentRankingUnits[lastIndex][0].matching_degree < sent.matching_degree) {
this.currentRankingUnits[lastIndex].splice(0, 1);
this.currentRankingUnits[lastIndex].push(sent);
} else {
this.currentRankingUnits.push([sent]);
}
}
});
} else {
......
......@@ -16,7 +16,6 @@ export class VocabularyService {
currentReferenceVocabulary: VocabularyCorpus = VocabularyCorpus.bws;
currentSentences: Sentence[] = [];
currentTestResults: { [exerciseIndex: number]: TestResultMC } = {};
// desiredMatchingPercentage: number = 50;
desiredSentenceCount = 10;
frequencyUpperBound = 500;
ranking: Sentence[][] = [];
......
......@@ -189,6 +189,7 @@
"UNIT_MODUS_TEST": "Der Testmodus unterscheidet sich vor allem in zwei Dingen vom Lernmodus: Erstens wirst Du schon vor dem Originaltext zu den Wörtern des Textes (nur Grundwortschatz) 'geprüft', damit Du nach dem Üben mit der Software vergleichen kannst, ob Du inzwischen mehr über die geübten Wörter weißt. Zweitens werden alle Übungen durch einen Timer zeitlich begrenzt und Du erhältst zunächst kein Feedback zu Deinen Antworten (wie bei den Tests in der Schule). Erst nach der Auswertung kannst Du Dir alle Deine Antworten noch einmal anschauen.",
"UNIT_TEST_TITLE": "Abschlusstest:",
"VOCABULARY_CHECK": "Vokabular vergleichen",
"VOCABULARY_CHECK_ADAPT_PASSAGES": "Intelligente Textpassagenauswahl",
"VOCABULARY_CHOOSE_CORPUS": "Korpus auswählen...",
"VOCABULARY_ITEMS": "Vokabeln",
"VOCABULARY_MATCHING_DEGREE": "Übereinstimmung",
......
......@@ -189,6 +189,7 @@
"UNIT_MODUS_TEST": "The test mode differs from the learning mode mainly in two things: First, you will be 'checked' before the original text for the words of the text (basic vocabulary only), so that after practicing you can compare with the software whether you know more about the words you have practiced. Second, all exercises are timed by a timer and you don't get any feedback on your answers (like in the school tests). Only after the evaluation you can look at all your answers again.",
"UNIT_TEST_TITLE": "Final test:",
"VOCABULARY_CHECK": "Compare vocabulary",
"VOCABULARY_CHECK_ADAPT_PASSAGES": "Intelligent choice of text passages",
"VOCABULARY_CHOOSE_CORPUS": "Choose corpus...",
"VOCABULARY_ITEMS": "Items",
"VOCABULARY_MATCHING_DEGREE": "Matching Percentage",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment