German learners face a unique challenge: the language's flexible word order and complex grammatical relationships create a web of dependencies that traditional learning tools struggle to illuminate. When a student encounters a sentence like "Ich hatte gestern meinem Freund das Buch gegeben, das er lesen wollte," they need to understand multiple layers: the past perfect construction, dative/accusative case distinctions, and relative clause attachment. I decided to build something differentâa tool that could instantly parse these structures into interactive dependency trees, provide contextual definitions for each word form, and generate complete stories that reinforce the grammatical patterns.
The result is satzklar.net, a German grammar visualization platform that combines dependency parsing, interactive analysis, and AI-generated contextual stories. What makes this project technically interesting isn't just what it does, but how it was built: entirely using Anthropic Claude for both development and runtime language processing.

The Technical Challenge
German presents several computational linguistics challenges that make it an ideal testbed for modern AI:
Flexible Word Order: Unlike English's relatively rigid SVO structure, German allows significant variation for emphasis and style. The same semantic content can be expressed in multiple grammatically valid ways, each with different pragmatic implications.
Case System Complexity: Four cases (Nominativ, Akkusativ, Dativ, Genitiv) create intricate dependency relationships that determine meaning. A parser needs to track not just syntactic relationships but also morphological markers and their semantic implications.
Compound Constructions: German's ability to create complex compound words and nested grammatical structures requires deep analysis beyond surface-level tokenization.
Traditional approaches to these problems typically involve:
- Rule-based parsers with extensive German-specific grammar rules
- Statistical models trained on German treebanks
- Hybrid systems combining multiple specialized components
Instead, I chose to leverage Claude's general language understanding capabilities for both the development process and the runtime analysis.
Development with Claude Code
The entire application was built using Claude Code, Anthropic's agentic development tool. This proved particularly effective for a linguistics project because:
Domain Knowledge Integration: Rather than researching German grammatical terminology and computational linguistics literature separately, I could discuss concepts with Claude in real-time during development. Questions like "How should I represent reflexive pronouns in the component tree?" became collaborative design sessions.
Rapid Prototyping: The iterative nature of language tool developmentâwhere you need to test with diverse sentence structures and edge casesâbenefited enormously from Claude's ability to generate test cases, suggest improvements, and implement changes quickly.
Linguistic Accuracy: Claude's training on linguistic literature meant that grammatical categorizations and terminology remained consistent with academic standards rather than ad-hoc approximations.
Runtime Language Processing Architecture
The application uses Claude API for three distinct language processing tasks, each leveraging different aspects of its capabilities:
Dependency Parsing and Grammatical Analysis
When a user inputs a German sentence, Claude performs comprehensive linguistic analysis:
Input: "Der schnelle braune Fuchs springt Ăźber den faulen Hund."
Claude generates:
- Syntactic dependency tree with labeled relationships
- Morphological analysis (case, gender, number for each token)
- Part-of-speech tagging with German-specific categories
- Grammatical role identification (Subjekt, Prädikat, Objekt, etc.)
This isn't simply running a pre-trained parserâClaude contextually understands the grammatical relationships and can explain why specific assignments are made. The component tree visualization emerges from Claude's analysis of how each word functions within the sentence structure.

Contextual Term Definition
The real-time dictionary functionality presents an interesting technical challenge. When users click on any word, Claude provides:
- Contextual Translation: Not just dictionary definitions, but translations that fit the specific usage context
- Grammatical Explanation: Why this word takes this particular form in this sentence
- Usage Examples: Additional sentences demonstrating the same grammatical pattern
- Etymology: Historical development that helps explain current usage patterns
This requires Claude to maintain awareness of the full sentence context while providing focused information about individual componentsâa task that would traditionally require multiple specialized systems.


Story Generation with Grammatical Integration
The story generation feature creates complete German stories that incorporate the analyzed sentence while maintaining its grammatical structures. This involves several technical challenges:
- Semantic Consistency: The generated story must be semantically coherent while structurally incorporating specific grammatical patterns
- Stylistic Appropriateness: Stories match the register and complexity level of the input sentence
- Educational Value: Generated content reinforces the grammatical concepts being studied
Claude handles this through what appears to be a form of constrained generationâcreating narratively satisfying content while respecting linguistic constraints derived from the original sentence analysis.

Technical Architecture Decisions
Why Claude Over Specialized NLP Libraries?
Traditional approaches might combine spaCy for parsing, WordNet for definitions, and separate generation models for content creation. Using Claude API for all language processing tasks offers several advantages:
- Unified Context: Claude maintains awareness across all three tasks, enabling deeper integration between parsing, definition, and generation
- Multilingual Capability: The same architecture could extend to other languages without rebuilding specialized components
- Adaptive Precision: Claude can adjust analysis depth based on sentence complexity rather than applying fixed processing pipelines
Performance Considerations
API-based language processing introduces latency considerations. The application handles this through:
- Progressive Disclosure: Component tree renders immediately with basic analysis, while detailed explanations load asynchronously
- Intelligent Caching: Similar grammatical patterns are cached to reduce API calls
- Batched Requests: Multiple analysis tasks are combined where possible
// Example of Claude API integration for parsing
const parseGermanSentence = async (sentence) => {
const response = await anthropic.messages.create({
model: "claude-3-sonnet-20240229",
max_tokens: 2000,
messages: [{
role: "user",
content: `Parse this German sentence into a dependency tree with
grammatical analysis. Include morphological features, POS tags,
and syntactic relationships: "${sentence}"`
}]
});
return parseClaudeResponse(response.content);
};

Computational Linguistics Insights
Working with Claude on grammatical analysis revealed some interesting patterns:
- Contextual Disambiguation: Claude consistently resolves ambiguous cases (like German "der" which can be nominative masculine or dative feminine) based on broader sentence context rather than local features alone
- Pragmatic Awareness: The system recognizes when word order changes affect emphasis rather than just grammatical relationships
- Error Graceful Degradation: When faced with non-standard German (informal speech, typos), Claude provides "best guess" analysis rather than failing completely
Technical Details
- Frontend: Vanilla HTML, CSS, and JavaScript with dynamic component rendering
- Backend: Node.js serverless functions with Claude API integration
- Parsing Pipeline: Custom prompts optimized for German grammatical analysis
- Localization: Full German/English internationalization with linguistic terminology
- Performance: LRU caching, KV store persistence, and progressive loading
- Deployment: Vercel serverless platform with global CDN
satzklar.net is available at https://satzklar.net. The project demonstrates practical applications of large language models in educational technology and computational linguistics.
References and Acknowledgments
- Claude AI: Anthropic's AI assistant - Used for both development and runtime language processing
- Claude Code: Anthropic's agentic development tool - Used for the entire development process
- Anthropic: AI safety company - Creator of Claude AI and Claude Code
- Universal Dependencies: Linguistic annotation framework - Inspiration for dependency tree visualization
- German Grammar Resources: Various academic sources on German linguistics and computational grammar
About the Author
This post was written collaboratively between Allan Scott and Claude AI, representing the same human-AI collaboration approach used to build satzklar itself. The development insights come from real experience building an AI-powered language learning tool entirely through Claude Code.