How I learn Japanese offline

How I learn Japanese offline
Photo by Jezael Melgoza / Unsplash

Sometimes I travel for many hours or I sit in cute coffee shops, and I love to learn Japanese while doing it.

But I don't have internet :(

Here's a collection of tools I use to learn Japanese offline.

Manga

I read manga that has been processed with Mokuro.

GitHub - kha-white/mokuro: Read Japanese manga inside browser with selectable text.
Read Japanese manga inside browser with selectable text. - kha-white/mokuro

Mokuro makes it so the text in manga is clickable. You can highlight it and copy it to places!

You can find a bunch of Mokuro'd process manga here:

Index of /manga/

It might be piracy in your country, so be careful.

I put this manga into Mokuro Reader which lets me read it:

Mokuro

I use Microsoft Edge to read Manga on since the battery lasts longer.

If you make Mokuro Reader into a PWA app:

Install, manage, or uninstall apps in Microsoft Edge - Microsoft Support

You can use it offline too!

Yomitan

Yomitan is a pop-up dictionary for many languages that lets me look up words very quickly. If I like a word enough, I can even put it into Anki (my flashcards app)!

But, if I put it into Anki without internet the flashcard won't have audio. I like to have audio of the word so I know how it's pronounced.

Thankfully, someone has thought of this and Local Audio Yomitan exists πŸ₯³

GitHub - yomidevs/yomitan: Pop-up dictionary browser extension. Successor to Yomichan.
Pop-up dictionary browser extension. Successor to Yomichan. - yomidevs/yomitan

ChatGPT

Sometimes people talk weirdly in Manga and I can't really understand them. The words aren't in my dictionary either.

I go to Chatgpt and I ask it to explain, and it does an excellent job at this. But... how do we access ChatGPT without the use of internet?

Enter LM Studio πŸ₯³

Local LLMs

LM Studio lets you run Large Language Models (LLMs, what ChatGPT is) locally.

Download and install it from here:

LM Studio - Experiment with local LLMs
Run Llama, Mistral, Phi-3 locally on your computer.

You may notice the default Llama model is slow. Not to worry! Click on Search and look for SmolLM2-360m.

The number is how big the model is. Generally the bigger the better. If your computer can run the 1.7b model, go ahead!

But for me, it's a bit too slow.

So I use the 360m model. It works instantly for me, no waiting πŸ₯³

On the right hand side under "Advanced Configuration" I use this system prompt:

I am learning Japanese. When I give you a sentence, break it down for me. Tell me about the nuance to the words being used. Treat it as once sentence, even if it has new lines. An example of a good output is:
Sure! Let's break down the sentence "δ½δΌ―γ•γ‚“γŒιš£γ«γ„γ‚‹" (Saeki-san ga tonari ni iru).

1. **佐伯さん (Saeki-san)**: This is a proper noun referring to a person named Saeki. The suffix "さん" (san) is a polite honorific used in Japanese, similar to "Mr." or "Ms." in English.
2. **が (ga)**: This is a particle that marks the subject of the sentence.
3. **隣に (tonari ni)**: "隣" (tonari) means "next to" or "beside," and "に" (ni) is a particle indicating location or direction.
4. **いる (iru)**: This is a verb meaning "to be" or "to exist," used for animate objects like people or animals.

So, the sentence "δ½δΌ―γ•γ‚“γŒιš£γ«γ„γ‚‹" translates to "Saeki-san is next to me" or "Saeki-san is beside me."

I find if I don't explicitly tell it what I want, it won't do it.

Here's an example:

You will see some parts of this output are wrong. Like all LLMs, take it with a grain of salt. But, it's good enough to iterate on!

It took about 7 seconds to start writing, which is pretty good considering it's running entirely on my laptop!

Conclusion

Okay so I learn Japanese offline by:

  • Reading as much manga as possible
  • Looking up words with Yomitan
  • Adding said words to Anki with local audio πŸ˜„
    • If I cannot work out what a sentence says, I will turn to my local LLM πŸ‘»