Skip to content

Commit 394159d

Browse files
committed
updated README
1 parent 169bcff commit 394159d

File tree

1 file changed

+33
-1
lines changed

1 file changed

+33
-1
lines changed

README.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# Flashcard Generator Core
32

43
This project is the `flashcard-generator-core` library that uses the GPT API to create basic sentences using provided words in different languages.
@@ -12,6 +11,12 @@ The library supports various languages and can export the generated sentences to
1211
- Configuration for language-specific features via a JSON file.
1312
- Export generated flashcards to multiple file formats (CSV, JSON).
1413
- Easily extendable to support more languages.
14+
- Strict formatting rules for consistent and high-quality flashcards:
15+
- Automatic "to" prefix for infinitive verbs in both languages
16+
- Consistent capitalization (lowercase for vocabulary, proper sentence case for examples)
17+
- Proper sentence punctuation
18+
- Prevention of target word appearance in native language sentences
19+
- Support for generating multiple varied flashcards for the same word
1520

1621
## Requirements
1722
- Java 22 or higher
@@ -76,6 +81,33 @@ This flexibility allows developers to create applications that fit their specifi
7681

7782
1. **GPT Implementation** (`FlashcardServiceGPTImpl.java`): Currently the only flashcard service available is using the OpenAI API. The service uses a `PromptService` to generate the appropriate prompts to the API, `HttpClientService` to generate the HTTP request and handle the HTTP response, and a `JsonParseService` to parse the response under the hood.
7883

84+
#### Flashcard Formatting Rules
85+
86+
The library enforces strict formatting rules to ensure consistency and quality in generated flashcards:
87+
88+
1. **Verb Handling**:
89+
- Infinitive verbs are automatically prefixed with "to " in both native and target languages
90+
- Example: "to run" / "to speak" / "to write"
91+
92+
2. **Case Consistency**:
93+
- Vocabulary words (both native and target) are always in lowercase
94+
- Example sentences follow proper capitalization rules (start with capital letter)
95+
96+
3. **Sentence Structure**:
97+
- All example sentences must end with a period
98+
- Proper sentence structure and punctuation are enforced
99+
100+
4. **Word Usage in Sentences**:
101+
- For sentence-based flashcards, the target word NEVER appears in the native language sentence
102+
- Instead, appropriate translations or alternative phrasings are used
103+
- This ensures proper learning without direct word repetition
104+
105+
5. **Multiple Flashcard Generation**:
106+
- When generating multiple flashcards for the same word, each flashcard:
107+
- Uses exactly the same target word (no synonyms or related words)
108+
- Provides different example sentences and contexts
109+
- Maintains all formatting rules consistently
110+
79111
### Output Services
80112

81113
1. **CSV Mode** (`OutputServiceCsvMode.java`): Flashcards can be exported to a CSV file, where each flashcard is a separate line with fields separated by commas.

0 commit comments

Comments
 (0)