This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Blog

This is the blog section. It has two categories: News and Releases.

Files in these directories will be listed in reverse chronological order.

How AI Powers SakeSaySo's Language Learning

10 months into the SakeSaySo project, we reflect on our journey with AI and automation, exploring how we’ve enhanced the language learning experience.

A ChatGPT/DALL·E illustration for AI in language learning.
SakeSaySo / CC-BY-CA

In our ongoing journey with SakeSaySo, we’ve been exploring ways to automate and enrich the learning experience by experimenting and integrating various AI tools. This project started as a modest side endeavor where we could toy with ideas and tools, particularly in automating content creation and embracing self-hosting, privacy and open-source principles. Most of these ideas can be traced back to Tokyo Izakaya sessions, where the only things flowing more freely than the drinks are ideas about changing language learning.

While the app itself, the logo and most of the translations and content was developed with tools like ChatGPT, DALL·E 3 (that’s right, the logo was created in seconds and just converted to SVG), Github Copilot, Claude.ai and other AI tools, one of the challenges was keeping content fresh and engaging without dedicating extensive resources to manual updates. This is a minor side project after all. To address this, we experimented with leveraging large language models (LLMs) to automate the generation of daily news summaries and social media content.

Automated News Summaries (in-app)

We developed a system that aggregates news headlines from various sources via RSS feeds. The process involves:

  1. Fetching Headlines: The system retrieves recent articles on topics like general news, science, economy, and sports, filtering out any content older than a week.
  2. Generating Summaries: Using LLMs, we generate concise summaries and translations of these articles. The models help in producing natural-sounding language that is suitable for learners.
  3. Formatting for Learning: The summaries are formatted to highlight key vocabulary and phrases, providing an educational context that aids in language acquisition.

Automated Social Media Posts

We also looked into automating our social media presence to offer additional touchpoints for engagement. Here’s how we approached it:

  1. Creating Tweets: The system generates short, tweets in Japanese with a light-hearted theme. The idea is to craft content that is culturally relevant and entertaining, without touching sensitive topics or being cringe. This was a challenge of prompt engineering in itself.
  2. Multi-Step Refinement: Each generated tweet undergoes several stages of refinement:
    • Content Evaluation: We check for appropriateness, length (ensuring it fits within platform character limits), and educational value.
    • Language Quality: The text is reviewed for naturalness and clarity, important factors in language learning.
    • Translation and Annotation: English translations and brief explanations are added to aid understanding.
  3. Automated Posting: Auto approved content is scheduled and posted automatically, maintaining a consistent online presence without manual intervention.

Content won’t blow you away and doesn’t always make perfect sense, but it’s a fun way to engage with the language and culture.

A generated tweet, including Japanese and its English translation, looks like this:

円相場が安定(あんてい)して、インフレイザーさんのツイートも減ったけど、BARではまだまだ盛り上がっているみたい。
The Bitcoin price has stabilized, and even the influencers' tweets have slowed down, but the bars are still lively. 🍺🎉

We keep refining the prompts and workflow steps as we go and see the results.

Data Pipelines & Workflow Tools

To manage these automated processes, we found existing solutions either too complex or not tailored to our specific needs. As a result, we developed custom tools to orchestrate the workflows involved in content generation and distribution. Using Kyodo Tech’s Orchid framework (on GitHub), a lightweight workflow orchestration framework built in Go, we handle multi-step workflows efficiently. Key features include:

  • Directed Graph Structure: Workflows are defined as directed acyclic graphs (DAGs), where each node represents a task, and edges define the execution order based on dependencies.
  • Data Passing Between Tasks: Tasks communicate by passing data in a standardized format, allowing for modularity and scalability.
  • Error Handling and Retries: Orchid includes robust error handling, with customizable retry policies for tasks that may fail due to transient issues.
  • Dynamic Routing: Based on runtime data and conditions, the workflow can branch dynamically, allowing flexible execution paths.
  • Context Management: It leverages Go’s context package to manage cancellation signals and pass metadata throughout the workflow.

This orchestration system, powered by the Orchid framework, enabled us to automate complex sequences, such as fetching data, processing it through AI models, refining the outputs, and handling the final distribution—all without manual oversight.

Infrastructure Automation

For deployment and infrastructure management, we created a process on top of Pulumi, that automates the provisioning of infrastructure and Kubernetes environments. Our focus is on:

  • Infrastructure as Code: Using Go and a set of libraries, we define and manage cloud resources programmatically, allowing for repeatable and version-controlled deployments.
  • Integration with CI/CD Pipelines: Continuous integration and delivery systems, automating the deployment process from code commit to production.
  • Secret Management: Securely handling sensitive information, like API keys and tokens, within the deployment pipeline.

Automated infrastructure provisioning enables quickly spinning up environments for testing and production, ensuring that our services are consistent and reliable.

Embracing Self-Hosting and Privacy

A core principle in our project is the emphasis on user privacy and control. We operate without tracking or advertising.

  • No Third-Party Tracking: The app does not include any third-party analytics or tracking services. User activity remains private and is not shared or sold.
  • Offline Functionality: All features of SakeSaySo are available offline. Users can download content and continue their learning without needing a constant internet connection.
  • Data Ownership: Users have full control over their data. Vocabulary decks and learning progress are stored locally, and users can export or delete their data at any time.
  • Open Communication: We’re transparent about how the app operates and are committed to open-sourcing as much of our work as possible. This allows the community to inspect, contribute to, and modify the code to suit their needs.

Self-hosting avoids dependencies and saves money.


Our experimentation with AI and automation has been a learning experience. By building custom tools and integrating advanced technologies, we’ve been able to automate much of the work with minimal costs. While our approach is one of many possible paths, our focus has been on practicality and learning, rather than striving for perfection. SakeSaySo remains a side project, offering a platform for experimenting and sharing ideas. We look forward to open-sourcing our tools soon and welcome collaboration.

Thank you for taking the time to read about our progress and reflections.

Kanji Stroke Orders and Regional Differences

Kanji characters are fundamental to Japanese writing and are also used across various regions in East Asia, each with its own unique practices. SakeSaySo utilizes Kanji Vector Graphics (KanjiVG) to animate the stroke orders of kanji, enrich learning with visually.

Kanji characters are fundamental to Japanese writing and are also used across various regions in East Asia, each with its own unique practices. SakeSaySo utilizes Kanji Vector Graphics (KanjiVG) to animate the stroke orders of kanji, enrich learning with visually.

Kanji on Vocabulary Pages

kanji-on-vocabulary-page

Kanji on Flash-Cards

kanji-onflashcard

KanjiVG offers detailed vector graphics for kanji, providing shape and direction of strokes but and their sequence. Japanese kanji are derived from Traditional Chinese characters and share many similarities with them in terms of structure and complexity. While Simplified Chinese characters, used predominantly in mainland China, have reduced strokes and altered forms for easier handwriting and learning, Japanese kanji have maintained many of the original complexities found in Traditional Chinese. This close resemblance to Traditional Chinese characters makes kanji a gateway to Japanese language but also connects cultural and historical threads between Japan and regions like Taiwan and Hong Kong, where Traditional Chinese is still used.

The structure of kanji is broken down into radicals and elements. While radicals help in categorizing and memorizing kanji, elements play a key role in defining the character’s full meaning and appearance. This distinction is interesting for learners, as it aids in understanding the composition and logic behind each kanji. For those using SakeSaySo, we’ve enabled stroke orders, for English speakers, by default on vocabulary pages and flash cards. You can find the toggles in the settings menu.

For anyone fascinated by the depth and diversity of languages, kanji offers a compelling glimpse into the cultural dialogues of East Asia. Take a moment to explore SakeSayso and let us know what you think!

Sentence based Japanese-English Learning

Sentences are a powerful tool for language learning. They provide context and grammar in a natural way, and can be used to learn vocabulary, grammar, and instill a feel for the language. Sentences can be used to learn new words, phrases, and idioms, and can help you understand how words are used in context.

Language is the bridge between cultures, and SakeSaySo commits to guiding learners across this bridge one sentence at a time. Unlike traditional language learning methods focused on isolated words or grammar rules, SakeSaySo focuses on Japanese-English through sentences. These sentences, drawn from stories and real-life dialogues, are supported by the JMDict dictionary, enabling deep dives into sentence fragments, words, and phrases including conjugations. While the app comes preloaded with thousands of example sentences alongside vocabulary, it also encourages users to expand their learning by adding their own sentences, thereby enhancing personal and community learning experiences.

Sentences provide context, which is important for understanding how language operates in the real world. This context aids in learning vocabulary in a natural manner and grasping grammatical structures as they are actually used. More than just a learning tool, they are revealing patterns, nuances, and the beauty inherent in everyday communication.

In times of ChatGPT, creating sentences for specific real-world scenarios has become more accessible. For example, we’ve crafted dialogues for engaging with Japanese institutions like the Pension Office and Hello Work, demonstrating how sentence-based learning can prepare users for real-life interactions.

ChatGPT dialogue for Japanese Pension Office and Hello Work.
Screenshot: SakeSaySo / CC-BY-CA

こちらで社会保険に加入する必要があると思います。教えてもらえますか?
I think I need to enroll in social insurance here. Could you tell me how?

こちらで雇用保険と失業保険に加入する必要があると思います。教えてもらえますか?
I think I need to enroll in employment insurance and unemployment insurance here. Could you tell me how?

Note that in SakeSaySo v1.2.0, a newline was required at the end of the last sentence, this bug was just fixed in v1.2.1.

The format for importing sentences is simple, each sentence on a new line where the order of languages doesn’t matter. The app will automatically recognize the language and add the sentence to the respective deck. Sentences can be learned on flash cards and their tokens can be inspected for individual words and phrases. From the sentence page, we can navigate to the dictionary entry for a word or phrase and add unknown vocabulary to our vocabulary decks.

Deck with Sentences

deck-sentences

Flash-Cards with Sentences

deck-sentences

Language is not just for the classroom but for life. SakeSaySo aims to support learners in applying the language in real-world scenarios.

Sharing Flash Card Decks

Flash Cards enable spaced repetition learning and help encapsulate sessions and chapters during language learning. With a focus on collaboration, a simple plaintext approach to building decks allows for collaboration and dictionary matching upon import.

Flash cards have long been a staple in language learning, offering a compact and effective method for memorizing vocabulary, phrases, and sentences. Our vocabulary decks focus on collaboration; a simple plaintext format facilitates ease of creation and modification of decks and hopefully encourages sharing.

Shared flashcard deck support from SakeSaySo v1.2.0 onwards.
Screenshot: SakeSaySo / CC-BY-CA

Community decks are supported from version 1.2.0 onwards of the SakeSaySo app. Decks at a glance:

  • Plaintext Format for Easy Editing and Sharing
  • Import and Export Capabilities
  • Dictionary Matching: optional, automatic dictionary matching enriches a deck entry with definitions, usage examples, other dictionary cross-references.
  • Flash Cards with adaptive SM-2 spaced repetition

The driving force behind Vocabulary Decks is the belief that language learning is a collective endeavor. By making deck sharing effortless, we aim to cultivate a learning environment where individuals can contribute to and benefit from others.

You can find community decks in the community section of the app, they’re indexed from the community repository where contributions can be made. See the format specification for more details on format and the import and export section for how to share and import decks.

Spaced Repetition with Adaptive SM-2

Spaced repetition systems (SRS) have emerged as powerful tools for enhancing long-term memory retention. Among these, Anki, advanced algorithms like FSRS, and the renowned SuperMemo (SM-17) stand out for their sophisticated methodologies. SakeSaySo has taken a simplified approach that prioritizes ease of use and simplicity in design.

Spaced repetition is a learning technique that increases intervals of time between subsequent reviews of previously learned material, based on the psychological spacing effect. It’s a strategy that optimizes memorization and recall efficiency. In language learning, this translates to remembering more with less effort.

Anki, FSRS, and SuperMemo SM-17 strut with the confidence of complex algorithms and intricate customization options. Then there’s SakeSaySo, more like the unassuming local izakaya than a flashy nightclub. We have opted for a more laid-back approach, keeping it simple – because who really wants to make recall quality decisions while slurping drinks?

Flash-cards in the SakeSaySo app v1.1.6.
Screenshot: SakeSaySo / CC-BY-CA

When comparing SakeSaySo’s adaptive version of the SM-2 algorithm to Anki, FSRS, and SuperMemo SM-17, it’s essential to understand our rationale. These well-established systems offer comprehensive and complex algorithms that cater to dedicated learners seeking deep customization and control over their learning process.

  • Anki: The versatile powerhouse of SRS, Anki offers intricate customization, appealing to learners who relish fine-tuning their learning experience.
  • FSRS: FSRS for Anki uses advanced algorithms to optimize memory prediction and scheduling. Ideal for data-driven learners, it’s akin to selecting the perfect saké based on intricate taste notes.
  • SuperMemo SM-17: Representing the cutting edge in SRS, SM-17 is based on years of research and offers highly optimized interval timing. It’s ideal for users who seek the most scientifically advanced method.

Keep It Simple and Sip Sake Straight

SakeSaySo’s version of the SM-2 algorithm is designed to be more straightforward. We recognize that while we may not match the depth of Anki or the complexity of SuperMemo SM-17, our focus is on providing a user-friendly interface and an algorithm that’s easy to understand and improve upon.

We understand that after a long day, the last thing you want to do is rate how well you remember a Japanese phrase on a scale. We’ve tailored the SM-2 algorithm to adjusting review intervals based on the speed of recall and personalize that recall speed to what’s ’normal’ for the learner. If a user recalls a word quickly, within a standard deviation of their mean, the interval before the next review is extended, and vice versa. This adaptive approach aims to optimize learning efficiency without overwhelming the user. It also adjusts over time as the user’s recall speed changes.

We’re the first to admit that we won’t match the advanced analytics of FSRS or the personalization of SuperMemo SM-17. But then again, we’re not trying to. Our goal is to take decision-making off your plate while keeping our side simple. Learning Japanese shouldn’t feel like a sommelier exam – it should be as relaxing as enjoying a smooth glass of Junmai Daiginjo.

Join Us

We’re on a journey to make learning Japanese as enjoyable as your favorite drink. We might not have all the answers, but we’re committed to improving one step at a time. Your feedback is the secret ingredient in our brew. Tell us what works, what doesn’t, and how we can make SakeSaySo better.

So, pour yourself a glass, kick back, and let’s learn some Japanese!