<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ali Özen</title>
    <description>The latest articles on DEV Community by Ali Özen (@aliozendev).</description>
    <link>https://dev.to/aliozendev</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4246092%2Fabbccbf0-a3d5-4030-a0ab-7f934d82262f.jpg</url>
      <title>DEV Community: Ali Özen</title>
      <link>https://dev.to/aliozendev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aliozendev"/>
    <language>en</language>
    <item>
      <title>Following one German word through my app, from a textbook page to static HTML</title>
      <dc:creator>Ali Özen</dc:creator>
      <pubDate>Tue, 17 Nov 2026 13:00:00 +0000</pubDate>
      <link>https://dev.to/aliozendev/following-one-german-word-through-my-app-from-a-textbook-page-to-static-html-473e</link>
      <guid>https://dev.to/aliozendev/following-one-german-word-through-my-app-from-a-textbook-page-to-static-html-473e</guid>
      <description>&lt;p&gt;Here's a sentence from my German vocabulary app:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Tom rief Mary an.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It means "Tom called Mary", and the app shows it as an example of the verb &lt;strong&gt;anrufen&lt;/strong&gt;, to call. Look at it again, though. "anrufen" isn't in it. The verb is split in two, the stem has changed its vowel, and Mary is standing in the middle.&lt;/p&gt;

&lt;p&gt;Getting that right for 6,000 words and about 450,000 sentences turned out to be most of the work behind &lt;a href="https://wortnest.aliozendev.com" rel="noopener noreferrer"&gt;Wortnest&lt;/a&gt;, a free German vocabulary app I built while learning German myself. So instead of a feature tour, this post follows one word, anrufen, from the page where I first met it to the screen. Each stop is a decision, and I got a few of them wrong first.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fe21i286onwlbjbdzuvvy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fe21i286onwlbjbdzuvvy.png" alt="The Wortnest app with the card for anrufen open. In each example sentence two separate words are highlighted, such as &amp;quot;rief&amp;quot; and &amp;quot;an&amp;quot; in &amp;quot;Tom rief Mary an.&amp;quot;" width="800" height="611"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The short version
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;There's no database for word data. A Python pipeline builds everything into static JSON files ahead of time.&lt;/li&gt;
&lt;li&gt;The word list started from my course books. Wiktionary adds translations and grammar, and Tatoeba adds real sentences.&lt;/li&gt;
&lt;li&gt;spaCy works out which words a sentence contains, under one rule: a wrong link is worse than a missing one.&lt;/li&gt;
&lt;li&gt;A React app reads the files. Search engines get 5,540 static HTML pages built from the same data.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fnhlhtat3352wiwukczk5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fnhlhtat3352wiwukczk5.png" alt="Diagram: four sources (course-book word lists, Wiktionary, Tatoeba, wordfreq) go through a Python build of five steps and come out as lexicon.json, one sentence file per word, and 5,540 plain HTML pages." width="800" height="344"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Stop 1: an ID that never changes
&lt;/h2&gt;

&lt;p&gt;anrufen starts as a line in the word lists at the back of my German course books. Those lists gave me the first 3,133 words, and that is all the books do here. The work starts after.&lt;/p&gt;

&lt;p&gt;The line becomes a Word with the ID &lt;code&gt;verb:anrufen&lt;/code&gt;. Nouns carry their article, so &lt;code&gt;der See&lt;/code&gt; (lake) and &lt;code&gt;die See&lt;/code&gt; (sea) are &lt;code&gt;noun:der:See&lt;/code&gt; and &lt;code&gt;noun:die:See&lt;/code&gt;, two different words.&lt;/p&gt;

&lt;p&gt;There's no auto-increment and no row number. You can mark a word as known or to learn, and those marks are stored under this ID. If I add words and rebuild, row 412 might be a different word tomorrow, and someone's "known" would quietly move to a word they've never seen. An ID made from the word itself survives any rebuild. If two entries ever produce the same ID, the build fails on purpose.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stop 2: Wiktionary fills in the rest
&lt;/h2&gt;

&lt;p&gt;A word list says which words matter, and not much more. Translations, pronunciation and full inflection tables come from &lt;a href="https://kaikki.org" rel="noopener noreferrer"&gt;Kaikki&lt;/a&gt;, a machine-readable dump of English Wiktionary. The German part is a 99 MB JSON Lines file, streamed line by line at build time.&lt;/p&gt;

&lt;p&gt;For anrufen, Wiktionary adds what the next stop needs most: every form of the verb. &lt;em&gt;ruft an&lt;/em&gt;, &lt;em&gt;rief an&lt;/em&gt;, &lt;em&gt;angerufen&lt;/em&gt;, &lt;em&gt;anzurufen&lt;/em&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stop 3: finding a word that isn't there
&lt;/h2&gt;

&lt;p&gt;Example sentences come from &lt;a href="https://tatoeba.org" rel="noopener noreferrer"&gt;Tatoeba&lt;/a&gt;, a collection of sentences written and translated by volunteers. It has about 785,000 German sentences. Around 498,000 have a direct English translation. After dropping very short and very long ones, pre-1996 spellings like &lt;em&gt;daß&lt;/em&gt;, and a list of words I don't want in a learner's app, 451,029 are left.&lt;/p&gt;

&lt;p&gt;Each one goes through spaCy's small German model, &lt;code&gt;de_core_news_sm&lt;/code&gt;. This is its real output for our sentence:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Tom rief Mary an.
  rief   lemma: rufen   pos: VERB   dep: ROOT
  an     lemma: an      pos: ADP    tag: PTKVZ   dep: svp → rief
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The coarse tag calls "an" an &lt;code&gt;ADP&lt;/code&gt;, the same as the preposition. The fine tag gives it away: &lt;code&gt;PTKVZ&lt;/code&gt; is a separated verb particle, and the &lt;code&gt;svp&lt;/code&gt; dependency points at the verb it belongs to. That pair is how the pipeline knows this "an" is the second half of anrufen.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fphlv0hyareiv4dhuc3pg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fphlv0hyareiv4dhuc3pg.png" alt="spaCy's dependency parse of &amp;quot;Tom rief Mary an.&amp;quot; An arc labelled svp runs from &amp;quot;rief&amp;quot; to &amp;quot;an&amp;quot;, which carries the tag PTKVZ." width="800" height="320"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The lemma is the weak spot. The small model got "rief" right here, but it often doesn't. It turns "isst" (eats) into "issen", which isn't a word. In "Rufst du ihn je an?" it decides "Rufst" is a proper noun, someone called Rufst. So the pipeline reads Wiktionary a second time, for every inflected form of every word, and maps each form back to its Word. That sentence is on anrufen's card anyway, with both pieces linked.&lt;/p&gt;

&lt;p&gt;The result is stored as character spans, so the app can highlight both pieces:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"text"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Tom rief Mary an."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"links"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"wordId"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"verb:anrufen"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"spans"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then there's the rule that shaped everything else, written at the top of the linking module: &lt;strong&gt;a wrong link is worse than a missing one.&lt;/strong&gt; A link tells a learner "this is how the word is used". If it's wrong, it teaches something false. A missing link only costs one example. So when a form could belong to two words and no explicit rule decides, nothing is linked. Some rules do decide. &lt;em&gt;gehört&lt;/em&gt; is &lt;em&gt;hören&lt;/em&gt; (heard) when a form of &lt;em&gt;haben&lt;/em&gt; is in the sentence, and &lt;em&gt;gehören&lt;/em&gt; (belongs) otherwise.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stop 4: the number that lied
&lt;/h2&gt;

&lt;p&gt;How do you know the links are right? In each review round, 200 random sentences are checked link by link. After fixing what a round finds, the next round uses a new random seed, because measuring again on the sample you just fixed is grading your own homework.&lt;/p&gt;

&lt;p&gt;The first round found 11 wrong links out of 1,113, so 99.0%. After the fixes, a fresh sample gave 4 out of 1,082, 99.6%. It looked done.&lt;/p&gt;

&lt;p&gt;It wasn't. 200 sentences say very little about a mistake that hits one small group of words. So I diffed the old and new rules over the whole corpus, every link that changed. That turned up possessive &lt;em&gt;seine&lt;/em&gt; linked to &lt;em&gt;Ihr&lt;/em&gt; (formal "your") in 5,231 sentences, and &lt;em&gt;gehört&lt;/em&gt; sent to &lt;em&gt;gehören&lt;/em&gt; in 1,172. Neither had shown up in a sample.&lt;/p&gt;

&lt;p&gt;Since then a rule change comes with a corpus diff, and the review runs again after big changes. The latest round, on the full 6,000 words: 6 wrong and 2 missed out of 1,232 links, 99.5%. Half of the wrong ones are names, like the &lt;em&gt;Los&lt;/em&gt; in Los Angeles. Two honest caveats. The reviews were done by Claude in a coding session, not by a native speaker. And known gaps stay known: &lt;em&gt;weiß&lt;/em&gt; meaning white still links to &lt;em&gt;wissen&lt;/em&gt; (to know) in about 39 sentences.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stop 5: easiest first
&lt;/h2&gt;

&lt;p&gt;anrufen has more sentences than a card can show, so its card shows 30, easiest first. "Easy" is computed: each word in a sentence costs something by how common it is, from 0 for the most common to 4 for rare ones, and 5 for a word the app doesn't have, since you can't look it up. Names, numbers, pronouns and articles are free.&lt;/p&gt;

&lt;p&gt;Taking the 30 easiest had a funny failure. The card for &lt;em&gt;die Uhr&lt;/em&gt; (clock) filled all 30 places with "Uhr" and never showed the plural, "Uhren". So now every form takes a turn, round-robin. Rare forms like &lt;em&gt;anrieft&lt;/em&gt; only get the places the common forms leave, so they can't push out "Ich rufe dich an".&lt;/p&gt;

&lt;h2&gt;
  
  
  Where 6,000 words came from
&lt;/h2&gt;

&lt;p&gt;The first version showed 200 words. They were picked by a hash of their IDs, so every build gave the same 200, and that was enough to get the card, the filters and the linking right before scaling up.&lt;/p&gt;

&lt;p&gt;The first 3,133 words came from that course-book list. The rest came from &lt;a href="https://github.com/rspeer/wordfreq" rel="noopener noreferrer"&gt;wordfreq&lt;/a&gt;, a word frequency list, up to 6,000. Frequency lists are noisy: English words, names, slang. The rule that cleaned up most of it was simple. A frequency word with fewer than 3 example sentences gives way to the next candidate. 528 words were swapped out like that, &lt;em&gt;mega&lt;/em&gt; and &lt;em&gt;fake&lt;/em&gt; among them.&lt;/p&gt;

&lt;p&gt;Those first words already had a level. The other 2,866 got one, estimated by an LLM from the word, its class, its translation and its frequency, and the app shows them with a ≈, as in "≈B1". It's an estimate, and it says so.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stop 6: a file, not a database
&lt;/h2&gt;

&lt;p&gt;The pipeline writes two kinds of files:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;lexicon.json&lt;/code&gt; with all 6,000 words, about 250 KB gzipped. The app loads it once.&lt;/li&gt;
&lt;li&gt;One JSON file per word with up to 30 sentences, loaded when you open the word. That's 114,744 sentences in all.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;anrufen's file is &lt;code&gt;766572623a616e727566656e.json&lt;/code&gt;, which is &lt;code&gt;verb:anrufen&lt;/code&gt; in hex. Plain IDs as file names would break on a Mac, whose disk is case-insensitive by default: &lt;code&gt;pronoun:Ihr&lt;/code&gt; (formal "your") and &lt;code&gt;pronoun:ihr&lt;/code&gt; (her) would be the same file.&lt;/p&gt;

&lt;p&gt;The React app (Vite, TypeScript) only reads these files. There's no API call for word data and no database query. A service worker caches the word list, so once loaded the app works offline, and words you've opened keep their sentences. Your marks stay in localStorage. A small Fastify API with Postgres exists only to sync my own marks between devices.&lt;/p&gt;

&lt;p&gt;The data build, &lt;code&gt;pnpm data&lt;/code&gt;, takes about 40 seconds (the spaCy parse is cached under a hash of its inputs), runs every test and prints only what changed: words added, removed or changed. Two builds from the same input give the same files, and the input dumps are pinned by sha256. When "nothing changed" is the answer you expect, a report that says only that is the best review tool I've found.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stop 7: a page Google can read
&lt;/h2&gt;

&lt;p&gt;All of this was invisible to search engines, because the app is one &lt;code&gt;&amp;lt;div id="root"&amp;gt;&lt;/code&gt;. So the build also writes a plain HTML page for every word that has sentences, like &lt;a href="https://wortnest.aliozendev.com/word/anrufen/" rel="noopener noreferrer"&gt;/word/anrufen/&lt;/a&gt;: the word, its forms, the 10 easiest sentences and a button that opens it in the app. No framework and no hydration. That's 5,540 pages and a sitemap, written by the same TypeScript functions the app uses to show a word, so the two can't drift apart. The 460 words without sentences get no page, since a page with nothing on it is noise.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3olpduts300uh9xsqdkh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3olpduts300uh9xsqdkh.png" alt="The static page for anrufen: the word, its forms &amp;quot;ruft an · rief an · hat angerufen&amp;quot;, a button that opens it in the app, and example sentences with the word highlighted." width="800" height="558"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'd keep if I started again
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Do the slow, fuzzy work at build time and ship plain files. Whatever goes wrong goes wrong on my machine, where I can see it.&lt;/li&gt;
&lt;li&gt;Make IDs from meaning, not from position.&lt;/li&gt;
&lt;li&gt;Prefer a missing answer to a wrong one, and write that rule where the next person will read it.&lt;/li&gt;
&lt;li&gt;Don't trust one accuracy number. Measure on a fresh sample, and diff the whole output when a rule changes.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try it, and tell me what's wrong
&lt;/h2&gt;

&lt;p&gt;Wortnest is free, has no ads and needs no account: &lt;a href="https://wortnest.aliozendev.com" rel="noopener noreferrer"&gt;wortnest.aliozendev.com&lt;/a&gt;. If you speak German, open a few words and look at the highlighted links. If one is wrong, I'd like to hear which. That's exactly the kind of mistake a 200-sentence sample misses.&lt;/p&gt;

&lt;p&gt;And if you've handled lemmas for German strong verbs better than "read Wiktionary's tables", how did you do it?&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I write about what I build at &lt;a href="https://aliozendev.com" rel="noopener noreferrer"&gt;aliozendev.com&lt;/a&gt;. Wortnest was built with Claude Code, which also estimated the levels and reviewed the link samples.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>nlp</category>
      <category>webdev</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
