Skip to content

Simple, LLM powered terminal script to help learn language

License

Notifications You must be signed in to change notification settings

moz-gh/language-learner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Language Learner

Language Learner is a CLI-based tool designed to help users learn a new language through interactive phrase translation exercises. It generates learning material using the Formulaic API and stores progress locally.

Features

  • Generates language-learning phrases based on a structured formula.
  • Grades translations with AI feedback.
  • Tracks learned words and progress.
  • Supports multiple languages.

Prerequisites

Before setting up the project, ensure you have the following installed:

Installation

1. Clone the Repository

git clone https://github.com/yourusername/language-learner.git
cd language-learner

2. Install Dependencies

npm install

3. Configure the Application

The application requires a Formulaic API key to generate phrases. You will be prompted to enter it on the first run.

Alternatively, you can manually create a config file:

{
  "userLang": "en",
  "targetLang": "es",
  "schedule": 21600000,
  "apiKey": "your-formulaic-api-key",
  "formulaId": "",
  "dataFile": "./data/learned.json"
}

Save this file as data/config.json.

4. Run the Application

npm run start

This will start the language-learning session, prompting you with phrases and grading your translations.

Usage

Learning Session

  1. The app presents a phrase in the target language.
  2. Enter your translation or type skip to move on.
  3. If correct, you proceed to the next phrase.
  4. If incorrect, you receive feedback and another chance to retry.

Managing Data

All learned data is stored in data/learned.json. If needed, you can reset your progress by deleting this file.

Development

Running in Development Mode

To run in development mode:

npm run dev

Running Tests

npm run test

License

This project is licensed under the Mozilla Public License 2.0 (MPL-2.0). See LICENSE for details.

About

Simple, LLM powered terminal script to help learn language

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published