|
1 | | -# Common Word Training - Requirements |
2 | | - |
3 | | -**Feature**: Common Word Training |
4 | | -**Phase**: 3 |
5 | | -**Status**: ✅ Complete |
6 | | -**Last Updated**: 2025-12-30 |
| 1 | +# Common Words - Requirements |
7 | 2 |
|
8 | 3 | ## Overview |
9 | | - |
10 | | -Extends typing practice with the 500 most common words in French and English, enabling realistic vocabulary training with progressive difficulty levels. |
11 | | - |
12 | | -## Requirements (EARS Format) |
13 | | - |
14 | | -### US-1 Word Database |
15 | | - |
16 | | -WHEN the system initializes common word training |
17 | | -THE SYSTEM SHALL provide 500 most common words per language (French, English) |
18 | | - |
19 | | -### US-2 Normalize Frequency Weights |
20 | | -WHEN words are selected from corpus data |
21 | | -THE SYSTEM SHALL normalize frequency weights to 0.70-1.00 range |
22 | | - |
23 | | -### US-3 Sort Words by Frequency |
24 | | -WHEN words are ordered in the database |
25 | | -THE SYSTEM SHALL sort by descending frequency (most common first) |
26 | | - |
27 | | -### US-4 Progressive Difficulty Levels |
28 | | - |
29 | | -WHEN user selects Level 1 |
30 | | -THE SYSTEM SHALL provide practice with top 50 most common words |
31 | | - |
32 | | -### US-5 Level 2 Word Selection |
33 | | -WHEN user selects Level 2 |
34 | | -THE SYSTEM SHALL provide practice with top 100 most common words |
35 | | - |
36 | | -### US-6 Level 3 Word Selection |
37 | | -WHEN user selects Level 3 |
38 | | -THE SYSTEM SHALL provide practice with top 200 most common words |
39 | | - |
40 | | -### US-7 Level 4 Word Selection |
41 | | -WHEN user selects Level 4 |
42 | | -THE SYSTEM SHALL provide practice with all 500 most common words |
43 | | - |
44 | | -### US-8 Drill Mode (Level 1) |
45 | | - |
46 | | -WHEN user practices Level 1 common words |
47 | | -THE SYSTEM SHALL generate word repetition drills (e.g., "the the be be to to") |
48 | | - |
49 | | -### US-9 Repeat Each Word Twice |
50 | | -WHEN generating drill content |
51 | | -THE SYSTEM SHALL repeat each word exactly 2 times consecutively |
52 | | - |
53 | | -### US-10 Sentence Mode (Levels 2-4) |
54 | | - |
55 | | -WHEN user practices Levels 2-4 common words |
56 | | -THE SYSTEM SHALL generate natural word sequences mimicking sentences |
57 | | - |
58 | | -### US-11 Frequency-Weighted Selection |
59 | | -WHEN selecting words for sentence mode |
60 | | -THE SYSTEM SHALL use frequency-weighted random selection |
61 | | - |
62 | | -### US-12 High-Frequency Bias |
63 | | -WHEN applying frequency weighting |
64 | | -THE SYSTEM SHALL select 70% of words from top 20% (high-frequency) |
65 | | - |
66 | | -### US-13 Full Pool Selection |
67 | | -WHEN applying frequency weighting |
68 | | -THE SYSTEM SHALL select 30% of words from full pool (all levels) |
69 | | - |
70 | | -### US-14 Lesson Integration |
71 | | - |
72 | | -WHEN user views lesson menu |
73 | | -THE SYSTEM SHALL display 4 French common word lessons |
74 | | - |
75 | | -### US-15 English Lessons Display |
76 | | -WHEN user views lesson menu |
77 | | -THE SYSTEM SHALL display 4 English common word lessons |
78 | | - |
79 | | -### US-16 Lesson Ordering |
80 | | -WHEN lessons are displayed |
81 | | -THE SYSTEM SHALL position common word lessons after trigram lessons |
82 | | - |
83 | | -### US-17 Content Generation |
84 | | - |
85 | | -WHEN generating practice content |
86 | | -THE SYSTEM SHALL limit output to specified character length |
87 | | - |
88 | | -### US-18 Truncate at Boundary |
89 | | -WHEN character length is reached |
90 | | -THE SYSTEM SHALL truncate content at exact character boundary |
91 | | - |
92 | | -### US-19 UTF-8 Character Counting |
93 | | -WHEN using multi-byte UTF-8 characters |
94 | | -THE SYSTEM SHALL count characters (not bytes) for length constraints |
95 | | - |
96 | | -### US-20 Data Sources |
97 | | - |
98 | | -WHEN sourcing English word frequencies |
99 | | -THE SYSTEM SHALL use COCA (Corpus of Contemporary American English) data |
100 | | - |
101 | | -### US-21 French Word Database |
102 | | -WHEN sourcing French word frequencies |
103 | | -THE SYSTEM SHALL use Lexique 3.83 database |
104 | | - |
105 | | -### US-22 Testing Requirements |
106 | | - |
107 | | -WHEN testing word databases |
108 | | -THE SYSTEM SHALL verify exactly 500 words per language |
109 | | - |
110 | | -### US-23 Verify Frequency Order |
111 | | -WHEN testing frequency ordering |
112 | | -THE SYSTEM SHALL verify descending frequency order for all words |
113 | | - |
114 | | -### US-24 Test Drill Mode |
115 | | -WHEN testing content generation |
116 | | -THE SYSTEM SHALL verify drill mode produces word repetition |
117 | | - |
118 | | -### US-25 Test Sentence Mode |
119 | | -WHEN testing content generation |
120 | | -THE SYSTEM SHALL verify sentence mode produces word variety |
121 | | - |
122 | | -### US-26 Test Level Counts |
123 | | -WHEN testing level selection |
124 | | -THE SYSTEM SHALL verify correct word counts (50/100/200/500) |
125 | | - |
126 | | -## Success Criteria |
127 | | - |
128 | | -- ✅ 8 new lessons in menu (French L1-4, English L1-4) |
129 | | -- ✅ All 129 tests pass (+13 new tests) |
130 | | -- ✅ 500 words per language with normalized frequencies |
131 | | -- ✅ Drill mode shows repetition pattern |
132 | | -- ✅ Sentence mode shows variety and frequency bias |
133 | | -- ✅ Content respects character length constraints |
134 | | -- ✅ UTF-8 character counting works correctly |
135 | | -- ✅ No duplicate words in databases |
136 | | - |
137 | | -## Dependencies |
138 | | - |
139 | | -- **Phase 2 (Bigrams)**: Shares Language enum |
140 | | -- **Phase 2 (Trigrams)**: Follows same architectural pattern |
141 | | -- **rand crate**: Required for frequency-weighted random selection |
142 | | - |
143 | | -## Non-Requirements |
144 | | - |
145 | | -- ❌ No word metadata beyond frequency (no POS tags, difficulty ratings) |
146 | | -- ❌ No language-specific grammar rules or sentence structure |
147 | | -- ❌ No word definitions or translations |
148 | | -- ❌ No adaptive word selection based on user performance (handled by Adaptive Mode) |
| 4 | +The Common Words feature generates typing drills using frequently used words in French and English. This helps users improve their typing speed and accuracy by practicing realistic and commonly encountered vocabulary. |
| 5 | + |
| 6 | +## User Stories |
| 7 | + |
| 8 | +### US-1 Generate Common Word Drills |
| 9 | +``` |
| 10 | +WHEN a user selects the Common Words category |
| 11 | +THE SYSTEM SHALL generate drills using frequently used words |
| 12 | +AND ensure the drills are randomized for variety. |
| 13 | +``` |
| 14 | + |
| 15 | +### US-2 Support French and English Words |
| 16 | +``` |
| 17 | +WHEN generating common word drills |
| 18 | +THE SYSTEM SHALL support both French and English word lists |
| 19 | +AND ensure the words are relevant to typing practice. |
| 20 | +``` |
| 21 | + |
| 22 | +### US-3 Validate Word Lists |
| 23 | +``` |
| 24 | +WHEN generating common word drills |
| 25 | +THE SYSTEM SHALL ensure all words are valid for the AZERTY layout |
| 26 | +AND exclude invalid or unsupported words. |
| 27 | +``` |
| 28 | + |
| 29 | +### US-4 Progressive Difficulty |
| 30 | +``` |
| 31 | +WHEN generating common word drills |
| 32 | +THE SYSTEM SHALL organize words into progressive difficulty levels |
| 33 | +TO ensure a smooth learning curve. |
| 34 | +``` |
| 35 | + |
| 36 | +### US-5 Contextual Sentences |
| 37 | +``` |
| 38 | +WHEN generating common word drills at higher difficulty levels |
| 39 | +THE SYSTEM SHALL generate realistic sentences using the words |
| 40 | +TO improve contextual typing practice. |
| 41 | +``` |
| 42 | + |
| 43 | +## Integration Requirements |
| 44 | + |
| 45 | +### US-6 Common Words Lesson Selection |
| 46 | +``` |
| 47 | +THE SYSTEM SHALL add common words training options to the lesson selection menu |
| 48 | +- French Common Words - Level 1-4 |
| 49 | +- English Common Words - Level 1-4 |
| 50 | +``` |
| 51 | + |
| 52 | +### US-7 Common Words Statistics Tracking |
| 53 | +``` |
| 54 | +WHEN a user completes a common words lesson |
| 55 | +THE SYSTEM SHALL track per-word accuracy and speed metrics |
| 56 | +AND integrate with the existing analytics system. |
| 57 | +``` |
| 58 | + |
| 59 | +## Future Phase Requirements |
| 60 | + |
| 61 | +### US-8 Custom Word Lists (Phase 3+) |
| 62 | +``` |
| 63 | +FUTURE: Allow users to create custom word lists for practice. |
| 64 | +FUTURE: Import words from user-provided text samples. |
| 65 | +``` |
| 66 | + |
| 67 | +### US-9 Word Mastery Tracking (Phase 3+) |
| 68 | +``` |
| 69 | +FUTURE: Track mastery level for each word. |
| 70 | +FUTURE: Recommend practice based on weak words. |
| 71 | +FUTURE: Implement spaced repetition for word retention. |
| 72 | +``` |
0 commit comments