Skip to content

Commit c3ab272

Browse files
committed
updated flashcard types for including source language
1 parent f4d6224 commit c3ab272

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

src/main/java/com/jakegodsall/models/flashcards/SentenceFlashcard.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,42 +21,42 @@
2121
@Getter
2222
@Setter
2323
@EqualsAndHashCode(callSuper = false)
24-
@JsonPropertyOrder({ "nativeSentence", "targetSentence" })
24+
@JsonPropertyOrder({ "sourceSentence", "targetSentence" })
2525
public class SentenceFlashcard extends Flashcard {
2626
/**
2727
* A description of the flashcard's content.
2828
*/
29-
public static final String DESCRIPTION_OF_CONTENT = "A basic sentence in the native English language, and that sentence translated into the target language";
29+
public static final String DESCRIPTION_OF_CONTENT = "A basic sentence in the source language, and that sentence translated into the target language";
3030

3131
/**
3232
* A JSON structure template for creating flashcards.
3333
* It uses the {@link StringUtils#createJsonComponent} utility to generate the components.
3434
*/
3535
public static final String JSON_STRUCTURE_FOR_PROMPT = "{\n" +
36-
StringUtils.createJsonComponent("nativeSentence", "<sentence in native English language>") + ",\n" +
36+
StringUtils.createJsonComponent("sourceSentence", "<sentence in source language>") + ",\n" +
3737
StringUtils.createJsonComponent("targetSentence", "<sentence in target language>") + "\n" +
3838
"}\n";
3939

4040
/**
41-
* The sentence in the native language (e.g., English).
41+
* The sentence in the source language.
4242
*/
43-
@CsvBindByName(column = "nativeSentence")
43+
@CsvBindByName(column = "sourceSentence")
4444
@CsvBindByPosition(position = 0)
45-
private String nativeSentence;
45+
private String sourceSentence;
4646

4747
/**
48-
* The sentence translated into the target language.
48+
* The sentence in the target language.
4949
*/
5050
@CsvBindByName(column = "targetSentence")
5151
@CsvBindByPosition(position = 1)
5252
private String targetSentence;
5353

5454
/**
5555
* Returns a string representation of the flashcard,
56-
* displaying the native and target sentences.
56+
* displaying the source and target sentences.
5757
*/
5858
@Override
5959
public String toString() {
60-
return nativeSentence + ", " + targetSentence;
60+
return sourceSentence + ", " + targetSentence;
6161
}
6262
}

src/main/java/com/jakegodsall/models/flashcards/WordFlashcard.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,29 +25,29 @@
2525
@Setter
2626
@EqualsAndHashCode(callSuper = false)
2727
@Builder
28-
@JsonPropertyOrder({ "nativeWord", "targetWord", "exampleTargetSentence" })
28+
@JsonPropertyOrder({ "sourceWord", "targetWord", "exampleTargetSentence" })
2929
public class WordFlashcard extends Flashcard {
3030
/**
3131
* A description of the flashcard's content,
3232
*/
33-
public static final String DESCRIPTION_OF_CONTENT = "The word translated into the native language of English, the word itself, and a very basic sentence using the target word in the target language";
33+
public static final String DESCRIPTION_OF_CONTENT = "The word translated into the source language, the word itself, and a very basic sentence using the target word in the target language";
3434

3535
/**
3636
* A JSON structure template for creating flashcards.
3737
* It uses the {@link StringUtils#createJsonComponent} utility to generate the components.
3838
*/
3939
public static final String JSON_STRUCTURE_FOR_PROMPT = "{\n" +
40-
StringUtils.createJsonComponent("nativeWord", "<word in native language>") + ",\n" +
40+
StringUtils.createJsonComponent("sourceWord", "<word in source language>") + ",\n" +
4141
StringUtils.createJsonComponent("targetWord", "<word in target language>") + ",\n" +
4242
StringUtils.createJsonComponent("targetSentence", "<sentence in target language>") + "\n" +
4343
"}\n";
4444

4545
/**
46-
* The word in the native language (e.g., English).
46+
* The word in the source language.
4747
*/
48-
@CsvBindByName(column = "nativeWord")
48+
@CsvBindByName(column = "sourceWord")
4949
@CsvBindByPosition(position = 0)
50-
String nativeWord;
50+
String sourceWord;
5151

5252
/**
5353
* The word in the target language.
@@ -65,12 +65,12 @@ public class WordFlashcard extends Flashcard {
6565

6666
/**
6767
* Returns a string representation of the flashcard,
68-
* combining the native word, target word, and example sentence.
68+
* combining the source word, target word, and example sentence.
6969
*
7070
* @return a string representation of the flashcard content.
7171
*/
7272
@Override
7373
public String toString() {
74-
return nativeWord + " - " + targetWord + " - " + exampleTargetSentence;
74+
return sourceWord + " - " + targetWord + " - " + exampleTargetSentence;
7575
}
7676
}

0 commit comments

Comments
 (0)