I am lead to believe that the key to learning a new language, once you have the foundations, is to find a topic that you are interested in and explore out from there reinforcing your existing language vocabulary, grammar etc.
German grammar has just a couple of rules 🙂 Fortunately, for me, one of the big topics that interests me about the language is the grammar; I should be very well placed to learn the language given this interest. The consistency of grammar rules is a good thing too, despite the incessant number of exceptions to the rule.
I am a software developer/architect. Rarely do I design or write software for myself, other than as an offline learning exercise. As part of my exploration of the German language however, I wanted a trivial Excel spreadsheet to record notes, lecture or study notes if you prefer, retaining details of German verb conjugation.
My requirements are:
If these user requirements were implemented in Excel, it would enable me show the verbs that follow the conjugation rules (ie. weak verbs/regular verbs) from those that break the general rule (ie. strong verbs/irregular verbs). For the purposes of studying with the aim of speaking and writing German with the correct grammar, this is demonstrably important.
I show an animated graphic below, demonstrating what I crudely implemented in Excel (note this is elementary grammar that comes naturally to the native German speaker, obviously; to a native English speaker like me, it does not come that naturally at all!).
As it turned out, writing an Excel VBA macro to achieve this type of visual cue formatting proved trivial. I show the pivotal piece of code logic below.
Private Sub Worksheet_Change(ByVal r As range) Dim verbStemSuffix As String verbStemSuffix = Replace(Cells(VERBSUFFIXROW, r.Column).Value, "-", "") If verbStemSuffix <> "" Then Dim enteredVerbInfinitive As String enteredVerbInfinitive = Cells(r.Row, INFINITIVEFORMOFVERBCOLUMNNOMINATIVE) Dim enteredVerbInfinitiveStem As String enteredVerbInfinitiveStem = Left(enteredVerbInfinitive, Len(enteredVerbInfinitive) - Len(INFINITIVEFORMOFVERBSUFFIXNOMINATIVE)) Dim enteredVerb As String enteredVerb = r.Value Dim enteredVerbDeclinedStem As String enteredVerbDeclinedStem = Left(enteredVerb, Len(enteredVerb) - Len(verbStemSuffix)) Dim derivedVerb As String derivedVerb = enteredVerbInfinitiveStem & verbStemSuffix Call removeCellFormatting(r) ' If the verb has the expected conjugation, underline If Right(enteredVerb, Len(verbStemSuffix)) = verbStemSuffix Then Call underlineLetters(r, Len(enteredVerb) - Len(verbStemSuffix) + 1) End If If Len(derivedVerb) = Len(enteredVerb) Then If derivedVerb = enteredVerb Then ' Good, a regular verb/weak verb, do nothing more Else ' the strong verb and the entered verb have the same number of letters ' so likely just a vowel change or umlaut, in this scenario ' highlight the individual letters that are different Dim letter As Integer For letter = 1 To Len(enteredVerb) - Len(verbStemSuffix) If Mid(enteredVerb, letter, 1) <> Mid(derivedVerb, letter, 1) Then Call highlightLetter(r, letter) End If Next letter End If Else Call highlightCell(r) ' highlight the whole Excel cell End If End If End Sub
Even though the code is trivial (and yes I know I didn’t adhere to normal coding standards and Hungarian notation and all that crap that obfuscated Visual Basic/VBA code decades ago – the code is for me, not production software for a client), it was extremely satisfying to write. The satisfaction stems from writing a piece of software that adheres to rules, and from proving to myself I understand the basics of German verb conjugation. And when I write basics, I mean it; take a look at the conjugation tables for just this one verb, sprechen. It is quite daunting. Note too that for the infinitive form of weak verbs ending in –ern & –eln, there’s an exception case not handled by the code where for the wir, Sie, and sie forms, only a n is added to a subtly different stem, not an en. There is I understand exceptions for where weak verbs end in a -d or -t, and -m or -n too. Collectively accommodating for all these exceptions would add unnecessary complexity to the code excerpt and detract from the point of this blog article. Put another way, I am aware of the common exceptions, but have consciously not accommodated for them just now. Perhaps this is a task for a rainy day.
For those that are interested, and wish to revise or learn German Verb Conjugations on-the-go rather than at a desk with books and a computer, there exists a very handy app in the iTunes store. I use this too.
Finally, I am currently working in an Oracle development role in Munich Germany. My interest in the German language is more than just passing.
— Published by Mike, 14:47:18 05 May 2017 (CET)
By Month: November 2022, October 2022, August 2022, February 2021, January 2021, December 2020, November 2020, March 2019, September 2018, June 2018, May 2018, April 2018
Apple, C#, Databases, Faircom, General IT Rant, German, Informatics, LINQ, MongoDB, Oracle, Perl, PostgreSQL, SQL, SQL Server, Unit Testing, XML/XSLT
Michael
January 21st, 2018 at 8:55 pm
I do not Angela however this information is already available in a structured format from many sources. For example, verb declension for bekommen is detailed in the paper/hardback version of the Duden, their app dictionary, or online at https://www.duden.de/rechtschreibung/bekommen If you wanted the content in a file format, it wouldn’t be that hard to wget the required content, structure it in your required format with a bit of perl and a few regexes, and so on. Best of luck.
Glen Jankowski
October 24th, 2021 at 1:35 pm
Hello thanks for this, would you consider sharing your excel document or parts of it at all? I can see the code but have never made something myself. No problem if not and thanks for the great post.