Skip to content

Commit 19e5f22

Browse files
committed
Add LLM-based translation guide to README
Introduces documentation and examples for advanced symbol-preserving translation using LLMs. Updates links to analytics guides to reflect new file locations.
1 parent 26e9bb1 commit 19e5f22

1 file changed

Lines changed: 40 additions & 1 deletion

File tree

README.md

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,45 @@ const translatedBuffer = processor.processTexts(
194194
console.log("Translation complete!");
195195
```
196196

197+
### 🤖 LLM-Based Translation with Symbol Preservation
198+
199+
For advanced AI-powered translation that preserves symbol-to-word associations across languages, see the **[Translation Utilities Guide](./src/utilities/translation/README.md)**.
200+
201+
**Features:**
202+
- 🧠 **Intelligent symbol mapping**: LLMs understand grammar, not just word position
203+
- 🎯 **Cross-format support**: Works with Gridset, OBF/OBZ, TouchChat, and Snap
204+
- 🔗 **Symbol preservation**: Symbols stay attached to correct translated words
205+
-**Validated output**: Built-in validation catches translation errors
206+
207+
**Quick Demo:**
208+
```bash
209+
# Translate a Grid 3 file to Spanish using Gemini 2.0 Flash
210+
export GEMINI_API_KEY="your-key-here"
211+
node scripts/translation/gemini-translate-gridset.js "./tmp/Voco Chat.gridset" Spanish
212+
```
213+
214+
**Complete Example:**
215+
```typescript
216+
import { GridsetProcessor } from "@willwade/aac-processors";
217+
218+
const processor = new GridsetProcessor();
219+
220+
// 1. Extract buttons with symbol information
221+
const buttons = processor.extractSymbolsForLLM("board.gridset");
222+
223+
// 2. Create LLM prompt (or call your LLM API directly)
224+
// See: src/utilities/translation/README.md
225+
226+
// 3. Apply translations with preserved symbols
227+
processor.processLLMTranslations(
228+
"board.gridset",
229+
llmTranslations,
230+
"board-spanish.gridset"
231+
);
232+
```
233+
234+
See **[scripts/translation/](./scripts/translation/)** for complete working examples with Gemini, GPT-4, and other LLMs.
235+
197236
### 📊 AAC Analytics & Clinical Metrics
198237

199238
The library includes an optional high-performance analytics engine for evaluating AAC board sets based on the **AAC Effort Algorithm (v0.2)**.
@@ -205,7 +244,7 @@ The library includes an optional high-performance analytics engine for evaluatin
205244
- **Sentence Analysis**: Measure the effort required to construct common test sentences.
206245
- **Comparative Analysis**: Identify gaps and improvements between two pageset versions.
207246

208-
For detailed documentation, see the **[AAC Metrics Guide](./src/optional/analytics/docs/AAC_METRICS_GUIDE.md)** and **[Vocabulary Analysis Guide](./src/optional/analytics/docs/VOCABULARY_ANALYSIS_GUIDE.md)**.
247+
For detailed documentation, see the **[AAC Metrics Guide](./src/utilities/analytics/docs/AAC_METRICS_GUIDE.md)** and **[Vocabulary Analysis Guide](./src/utilities/analytics/docs/VOCABULARY_ANALYSIS_GUIDE.md)**.
209248

210249
```typescript
211250
import { ObfsetProcessor, Analytics } from "@willwade/aac-processors";

0 commit comments

Comments
 (0)