←Blog

How to Learn Japanese for Developers: A Systems Approach (With a Go Tool to Automate It)

You've taught yourself a dozen frameworks, read specs nobody wanted to read, and debugged things with no documentation. Japanese is another system with a spec, edge cases, and a large dictionary. It's big, but it isn't mysterious.

Most advice on learning Japanese is written for travelers or students. Most advice for developers is a list of 200 IT words and a note to "practice speaking." Neither tells you how the language actually works, or how to build a pipeline that keeps you learning.

This post covers both. You'll get a mental model of Japanese that works the way a programmer thinks, a phased roadmap, the tools that work, and a small Go program that pulls vocabulary out of real Japanese text you care about. That could be a README, a tech blog, or a conference talk transcript.

TL;DR

  1. Learn hiragana and katakana in the first two weeks. It's a small, finite character set.
  2. Treat grammar as a parser problem. Japanese is head-final and marks each word's role with a particle, so the rules are regular.
  3. Use spaced repetition (Anki with FSRS) for kanji and vocabulary. Don't cram.
  4. Mine sentences from content you actually read, and automate the boring parts with a tokenizer.
  5. Expect years, not months. Plan for 30–60 minutes a day, every day.

Japanese as a system: a mental model for programmers

Japanese grammar is more regular than English grammar. Once you see its structure, most sentences become something you can parse.

Three writing systems, three jobs

Script Count Job Dev analogy
Hiragana (ひらがな) 46 base characters Grammar: particles, verb endings Syntax and keywords
Katakana (カタカナ) 46 base characters Loanwords: サーバー (server), デプロイ (deploy) String literals from another language
Kanji (漢字) 2,136 jōyō (common-use) Meaning: nouns, verb and adjective stems Identifiers built from reusable modules

A typical sentence uses all three: サーバーを再起動しました ("I restarted the server"). Katakana carries the loanword, kanji carries the meaning (再起動, restart), and hiragana carries the grammar (を, しました).

Kanji are composed, not memorized whole

Most kanji are built from a few hundred recurring components called radicals. 言 (speech) appears in 語 (language), 話 (talk) and 読 (read). Learn the components and new kanji become new combinations of known parts, like imports.

Compound words compose the same way. 再 (again) + 起動 (startup) = 再起動 (restart). 変数 (variable) is 変 (change) + 数 (number).

Particles are type annotations

English uses word order to show who did what. Japanese tags each phrase with a particle that states its role. Word order becomes flexible, except that the verb comes last.

Particle Role Example
は (wa) Topic: "as for X" この関数は… (As for this function…)
が (ga) Subject エラーが出た (An error occurred)
を (o) Direct object コードを書く (write code)
に (ni) Target, destination, time 本番にデプロイする (deploy to production)
で (de) Means or location Goで書く (write in Go)
の (no) Possession, like . ユーザーの名前 (user.name)

Think of particles as named arguments. write(object: code, language: Go) works in any argument order, and so does Goでコードを書く.

Head-final order works like postfix notation

Japanese is subject–object–verb, and modifiers always come before what they modify. Read it like Reverse Polish notation: arguments first, then the operation. In 本番にデプロイしたコード ("the code that was deployed to production"), the whole clause before コード modifies it. That's why Japanese has no relative pronouns like "which" or "that."

Conjugation is function composition

Verbs take suffixes that stack in a fixed order. 食べる (eat) → 食べさせる (make someone eat) → 食べさせられる (be made to eat) → 食べさせられなかった (wasn't made to eat). Each suffix is a transform applied to the previous output. There are only two regular verb classes and a few irregular verbs, chiefly する (do) and 来る (come).

する is the most useful verb a developer can learn. It turns nouns into verbs: コミットする (to commit), リファクタリングする (to refactor), 実装する (to implement).

The roadmap: four phases, like a release plan

The US Foreign Service Institute puts Japanese in its hardest category for English speakers, at roughly 2,200 class hours to professional fluency. Getting useful for dev work takes far less. Treat it as a series of milestones, each with a clear definition of done.

  1. Phase 0: Kana (weeks 1–2). Learn all of hiragana, then katakana. Use a mnemonic deck such as Tofugu's free kana guide, plus 15 minutes a day of drills. Done when: you can read データベース and こんにちは without a chart. Skip romaji after week one. It's a crutch that slows your reading.
  2. Phase 1: Core grammar and first 1,000 words (months 1–6). Work through one structured grammar resource, such as the Genki textbooks or Tae Kim's free guide. In parallel, start a kanji system like WaniKani or an RTK-style Anki deck. Done when: you can parse simple sentences and know about 300 kanji. This is roughly JLPT N5–N4.
  3. Phase 2: Intermediate grammar and sentence mining (months 6–18). Shift from textbook to real content. Read NHK News Web Easy, simple tech blogs, and manga with furigana. Add every unknown word you meet to Anki as a full sentence. Done when: you can read a Qiita or Zenn article with a dictionary popup. This is roughly N3.
  4. Phase 3: Domain fluency (month 18 onward). Read Japanese docs, watch conference talks, and follow Japanese developers. Start writing: commit messages, issue comments, short blog posts. Done when: you can work in a Japanese repo and follow a standup. Target N2, which many Japanese employers ask for.

The Japanese-Language Proficiency Test (JLPT) runs twice a year in Japan, in July and December, with sittings in many other countries. Use it as a deadline, not a goal. Scheduling an exam is a reliable way to keep the habit going.

The toolchain: spaced repetition and sentence mining

The biggest lever is spaced repetition (SRS). Think of it as a cache-eviction policy for your brain. A card you answer correctly comes back after longer and longer intervals, and a card you miss comes back soon. You spend review time only on what you're about to forget.

Anki with FSRS

Anki is the standard tool. It's open source, scriptable, and has a large add-on ecosystem. Since version 23.10 it ships FSRS (Free Spaced Repetition Scheduler), a scheduler that fits a memory model to your own review history. It replaces the old SM-2 algorithm and usually needs fewer reviews for the same retention. Turn it on in your deck options, set desired retention to about 0.90, and let it optimize after you have a few hundred reviews.

Two rules matter more than any setting:

  • Do your reviews every day. Missed days create a backlog that grows faster than you expect.
  • Make sentence cards, not word cards. 実行 means "execute," but you learn more from テストを実行する (run the tests), because the card also teaches the particle and the verb.

The rest of the stack

Tool What it does Why a developer will like it
Yomitan Hover dictionary for the browser Read any Japanese web page; one click creates an Anki card
AnkiConnect Anki add-on with a local HTTP API on port 8765 Script card creation from any language
Jisho.org Free dictionary built on JMdict Search by kanji, radical or wildcard
WaniKani Paid kanji and vocabulary SRS with a fixed order A structured curriculum with an API for tracking progress
NHK News Web Easy Simplified news with furigana Daily reading at an intermediate level

Sentence mining

Sentence mining means collecting real sentences that contain exactly one word you don't know, then turning each into a card. It's the most effective intermediate method because the input is content you chose. The tedious part is finding the unknown words, and that's where code helps.

Build it: a sentence-mining tool in Go

This program reads Japanese text, finds every content word you don't already know, and writes an Anki-ready TSV, most frequent words first. Feed it a Japanese README, a Zenn article, or a talk transcript, and you get a study list drawn from your own field.

Why you need a tokenizer

Japanese doesn't put spaces between words, so strings.Fields gets you nothing. You need morphological analysis. That means looking up every possible word in a dictionary, building a lattice of candidate segmentations, and picking the lowest-cost path with the Viterbi algorithm. kagome is a pure-Go implementation of the approach MeCab uses. It has no cgo and embeds its dictionary, so you get a single static binary.

The tokenizer also gives you each word's dictionary form. 書いた, 書きます and 書かない all reduce to 書く, which is what you want on a flashcard.

Setup

mkdir mine && cd mine
go mod init mine
go get github.com/ikawaha/kagome/v2@latest github.com/ikawaha/kagome-dict/ipa@latest

The code

// mine: extract unknown vocabulary from Japanese text for sentence mining.
//
// Usage: mine -known known.txt < article.txt > cards.tsv
package main

import (
	"bufio"
	"flag"
	"fmt"
	"os"
	"sort"
	"strings"
	"unicode"

	"github.com/ikawaha/kagome-dict/ipa"
	"github.com/ikawaha/kagome/v2/tokenizer"
)

// candidate is one dictionary-form word we haven't learned yet.
type candidate struct {
	lemma    string // dictionary form, e.g. 書いた -> 書く
	reading  string // katakana reading from the dictionary
	count    int    // occurrences in the input
	sentence string // first sentence it appeared in
}

// contentPOS is the set of part-of-speech tags worth studying.
// Particles (助詞) and auxiliaries (助動詞) are grammar, not vocabulary.
var contentPOS = map[string]bool{"名詞": true, "動詞": true, "形容詞": true, "副詞": true}

func main() {
	knownPath := flag.String("known", "", "file of known words, one per line")
	minCount := flag.Int("min", 1, "only output words seen at least this many times")
	flag.Parse()

	known, err := loadKnown(*knownPath)
	if err != nil {
		fmt.Fprintln(os.Stderr, "loading known words:", err)
		os.Exit(1)
	}

	// The IPA dictionary is embedded in the binary. Building the tokenizer
	// is the expensive step, so do it once and reuse it for every sentence.
	t, err := tokenizer.New(ipa.Dict(), tokenizer.OmitBosEos())
	if err != nil {
		fmt.Fprintln(os.Stderr, "tokenizer:", err)
		os.Exit(1)
	}

	found := map[string]*candidate{}
	sc := bufio.NewScanner(os.Stdin)
	sc.Buffer(make([]byte, 1024*1024), 1024*1024)
	for sc.Scan() {
		for _, sentence := range splitSentences(sc.Text()) {
			for _, tok := range t.Tokenize(sentence) {
				pos := tok.POS()
				if len(pos) == 0 || !contentPOS[pos[0]] {
					continue
				}
				// Skip numbers, suffixes, pronouns and other non-words IPA tags as nouns.
				if len(pos) > 1 && (pos[1] == "数" || pos[1] == "接尾" || pos[1] == "非自立" || pos[1] == "代名詞") {
					continue
				}
				lemma, ok := tok.BaseForm()
				if !ok || lemma == "*" {
					lemma = tok.Surface
				}
				if known[lemma] || !hasJapanese(lemma) {
					continue
				}
				c, seen := found[lemma]
				if !seen {
					reading, _ := tok.Reading()
					c = &candidate{lemma: lemma, reading: reading, sentence: sentence}
					found[lemma] = c
				}
				c.count++
			}
		}
	}
	if err := sc.Err(); err != nil {
		fmt.Fprintln(os.Stderr, "reading input:", err)
		os.Exit(1)
	}

	// Most frequent first: those words pay off soonest.
	list := make([]*candidate, 0, len(found))
	for _, c := range found {
		if c.count >= *minCount {
			list = append(list, c)
		}
	}
	sort.Slice(list, func(i, j int) bool {
		if list[i].count != list[j].count {
			return list[i].count > list[j].count
		}
		return list[i].lemma < list[j].lemma
	})

	// Tab-separated output imports straight into Anki (File > Import).
	w := bufio.NewWriter(os.Stdout)
	defer w.Flush()
	for _, c := range list {
		fmt.Fprintf(w, "%s\t%s\t%s\t%d\n", c.lemma, c.reading, c.sentence, c.count)
	}
}

// splitSentences breaks a line on Japanese sentence terminators,
// keeping the terminator with its sentence.
func splitSentences(line string) []string {
	var out []string
	var b strings.Builder
	for _, r := range line {
		b.WriteRune(r)
		if r == '。' || r == '!' || r == '?' {
			if s := strings.TrimSpace(b.String()); s != "" {
				out = append(out, s)
			}
			b.Reset()
		}
	}
	if s := strings.TrimSpace(b.String()); s != "" {
		out = append(out, s)
	}
	return out
}

// hasJapanese filters out tokens that are pure ASCII, like code identifiers.
func hasJapanese(s string) bool {
	for _, r := range s {
		if unicode.In(r, unicode.Hiragana, unicode.Katakana, unicode.Han) {
			return true
		}
	}
	return false
}

func loadKnown(path string) (map[string]bool, error) {
	known := map[string]bool{}
	if path == "" {
		return known, nil
	}
	f, err := os.Open(path)
	if err != nil {
		return nil, err
	}
	defer f.Close()
	sc := bufio.NewScanner(f)
	for sc.Scan() {
		if w := strings.TrimSpace(sc.Text()); w != "" {
			known[w] = true
		}
	}
	return known, sc.Err()
}

Run it

go build -o mine .
echo 'テストを実行する前に、依存関係をインストールしてください。本番環境にデプロイしたコードでエラーが発生しました。エラーの原因を調査します。' \
  | ./mine -known known.txt

With サーバー and する in known.txt, the first lines of output are:

エラー        エラー        本番環境にデプロイしたコードでエラーが発生しました。   2
インストール  インストール  テストを実行する前に、依存関係をインストールしてください。   1
コード        コード        本番環境にデプロイしたコードでエラーが発生しました。   1
テスト        テスト        テストを実行する前に、依存関係をインストールしてください。   1
デプロイ                    本番環境にデプロイしたコードでエラーが発生しました。   1

Every word you mark as learned goes into known.txt, so each run only shows what's new to you.

Limits and next steps

  • Compounds get split. The IPA dictionary splits 依存関係 (dependencies) into 依存 + 関係. For study that's often fine. If you want longer units, swap in kagome-dict/uni (UniDic) or merge adjacent nouns yourself.
  • New loanwords have no reading. デプロイ isn't in the 2007-era IPA dictionary, so its reading comes back empty. Katakana words are readable anyway, so that's a cosmetic gap.
  • Skip the import step. POST each row to AnkiConnect's addNote action on localhost:8765 and cards appear in your deck directly.
  • Performance. Tokenizing is roughly linear in input length. Most of the startup time goes to loading the embedded dictionary, not to the text itself. For a web service, build one tokenizer at boot and share it, since Tokenize doesn't mutate it.

30 Japanese words every developer should know first

Tech Japanese mixes katakana loanwords you can sound out with kanji compounds you can't guess. Learn the kanji ones first: they're the words that block you when you read docs.

Japanese Reading English Example
実装 じっそう (jissō) Implementation 機能を実装する (implement a feature)
実行 じっこう (jikkō) Run, execute スクリプトを実行する
仕様 しよう (shiyō) Specification; "by design" それは仕様です (That's working as intended)
不具合 ふぐあい (fuguai) Defect, bug 不具合を修正する (fix a bug)
修正 しゅうせい (shūsei) Fix, correction
環境 かんきょう (kankyō) Environment 開発環境, 本番環境 (dev, prod)
本番 ほんばん (honban) Production
設定 せってい (settei) Settings, configuration 設定ファイル (config file)
変数 へんすう (hensū) Variable
定数 ていすう (teisū) Constant
関数 かんすう (kansū) Function
引数 ひきすう (hikisū) Argument
戻り値 もどりち (modorichi) Return value
型 かた (kata) Type 型安全 (type-safe)
文字列 もじれつ (mojiretsu) String
配列 はいれつ (hairetsu) Array
例外 れいがい (reigai) Exception 例外処理 (exception handling)
非同期 ひどうき (hidōki) Asynchronous
依存関係 いぞんかんけい (izon kankei) Dependencies
認証 にんしょう (ninshō) Authentication
権限 けんげん (kengen) Permission
性能 せいのう (seinō) Performance
要件 ようけん (yōken) Requirements 要件定義 (requirements definition)
設計 せっけい (sekkei) Design (architecture)
検証 けんしょう (kenshō) Verification, testing 検証環境 (staging)
障害 しょうがい (shōgai) Outage, failure 障害対応 (incident response)
対応 たいおう (taiō) Handling, response
レビュー rebyū Code review レビューをお願いします (please review)
マージ māji Merge
リリース rirīsu Release

仕様です deserves its own flashcard. You'll hear it often in Japanese teams, and it usually means "that's not a bug."

Immersion that doubles as professional development

You already read technical content every day. Move some of that reading into Japanese and your study time becomes work time too.

  • Read Japanese dev blogs. Qiita and Zenn are Japan's main developer writing platforms. Search for a topic you already know well, like Go concurrency or HTMX. Prior knowledge fills in the words you're missing.
  • Switch your docs language. MDN Web Docs has a full Japanese translation. Read a page you know in Japanese, then check the English when you get stuck.
  • Watch conference talks. Go Conference, PyCon JP, RubyKaigi and TSKaigi post talks on YouTube. Slides plus speech gives you reading and listening at once.
  • Read code written by Japanese developers. Comments, commit messages and issues in Japanese repos are short and practical. Ruby's issue tracker is a good place to start, since the language came out of Japan.
  • Write. Translate your own README into Japanese, or write a short post on Zenn. Producing output exposes gaps that reading hides.
  • Localize something you built. Adding a Japanese locale to a side project gives you real i18n practice and a reason to learn UI vocabulary like 保存 (save), 削除 (delete) and キャンセル (cancel).

Mistakes developers make learning Japanese

  1. Over-engineering the setup. Spending three weekends on the perfect Anki note type and add-on stack isn't learning Japanese. Ship a minimal setup and iterate.
  2. Staying on romaji. Romaji feels faster in week one and slows you down for years after. Read kana from the start.
  3. Avoiding kanji. Kanji look like the hardest part, but they're what makes reading fast. Two kanji often tell you the meaning of a word you've never seen.
  4. Grinding apps without real input. Gamified apps build a streak, not comprehension. After the basics, most of your time should go to real Japanese.
  5. Ignoring politeness levels. Japanese has casual, polite (です/ます) and honorific (敬語, keigo) registers. At work, use です/ます by default.
  6. Treating it as a sprint. Daily reviews matter more than weekend marathons, the same way small commits beat one giant PR.

FAQ

How long does it take a developer to learn Japanese?

At 30–60 minutes a day, expect about 6 months to read simple text and 18–24 months to read technical articles with a dictionary. The FSI estimates about 2,200 class hours for professional fluency.

Do I need Japanese to work as a developer in Japan?

Not always. Many international tech companies in Tokyo work in English. Japanese still widens your options, and many Japanese employers ask for JLPT N2.

What's the best app to learn Japanese for programmers?

Anki, because it's open source, scriptable and uses the FSRS scheduler. Pair it with Yomitan for reading and a grammar resource like Genki or Tae Kim's guide.

Should I learn kanji or vocabulary first?

Both, in parallel. Learning kanji alone gives you characters you can't use, and vocabulary alone leaves you unable to read new words. Study a kanji, then the common words that use it.

Can I program in Japanese?

Yes. Most languages accept Unicode identifiers, so 変数 := 42 compiles in Go. Hardly anyone does this in practice. Japanese appears in comments, docs and commit messages, not in identifiers.

Start this week

Learning Japanese as a developer comes down to treating it like any other large system. Understand the architecture, automate what's repetitive, and ship a little every day.

Here's your first sprint:

  • Learn hiragana (days 1–7)
  • Learn katakana (days 8–14)
  • Install Anki, turn on FSRS, and install AnkiConnect
  • Install Yomitan in your browser
  • Build the mine tool above and run it on one Japanese article in your field

If you build on the tokenizer, for example with AnkiConnect integration, UniDic, or a web UI, I'd like to see it. Leave a comment or send me a link.


Further reading: kagome on GitHub · Anki manual: FSRS · JLPT official site · Tofugu: Learn Hiragana

#Discussion · 0 comments

Leave a comment

By submitting a comment, you verify that you agree to our Privacy Policy and Terms of Service.