Skip to content

Open-source mobile app for memorizing poetry using Spaced Repetition and Offline Speech Recognition (Sherpa ONNX). Built with Flutter.

License

Notifications You must be signed in to change notification settings

mneme-verse/mneme

Repository files navigation

Mneme

style: very good analysis License: Apache 2.0

Generated by the Very Good CLI 🤖

Description

🚧 Initial Development Phase

Mneme is an open source mobile application designed to help users memorize poetry. The goal is to combine a distraction-free reading experience with Spaced Repetition and Offline Speech Recognition for real-time recitation feedback.

🛠 Tech Stack

  • Framework: Flutter (Dart)
  • Speech Recognition: Sherpa ONNX (High-performance, privacy-focused, offline ASR)

⚖️ Data Source & Attribution

This project utilizes the PoeTree corpus provided by the PoeTree team under CC BY-SA 4.0 / CC BY-NC-SA 4.0. Note: This application is an independent project and is not affiliated with the PoeTree team.

Local Environment Setup 🛠️

To ensure a smooth development experience, please set up the following tools:

1. Very Good CLI

Required for running tests with optimizations.

dart pub global activate very_good_cli

2. Lefthook (Git Hooks)

We use Lefthook to manage git hooks for checking formatting, code analysis, and spelling before commits.

Installation:

# Mac
brew install lefthook

# Linux / Windows / Others
go install github.com/evilmartians/lefthook@latest

Setup: Enable the hooks in your local repository:

lefthook install

3. CSpell (Spell Checker)

We use CSpell via npx to check for spelling errors. Requires Node.js and npm installed.


Getting Started 🚀

This project contains 3 flavors:

  • development
  • staging
  • production

To run the desired flavor either use the launch configuration in VSCode/Android Studio or use the following commands:

# Development
$ flutter run --flavor development --target lib/main_development.dart

# Staging
$ flutter run --flavor staging --target lib/main_staging.dart

# Production
$ flutter run --flavor production --target lib/main_production.dart

🗄️ Database Setup

The application requires pre-populated database assets (e.g., assets/database/en.db).

Production Database (PoeTree Corpus)

To generate the database from the real PoeTree corpus:

$ dart run tool/builder.dart

This will automatically:

  • Download CC-BY-SA 4.0 licensed corpora from Zenodo (~260k poems in cs, de, en, hu, no, pt, ru, sl)
  • Extract and process JSON files

Options:

  • --clean-before - Clean specific files BEFORE processing (poetree, db, zst)
  • --clean-after - Clean specific files AFTER processing (poetree, db)
  • --languages=cs,en,ru - Download only specified languages (comma-separated)

Examples:

# Download only English and Russian corpora
$ dart run tool/builder.dart --languages=en,ru

# Clean databases before rebuilding
$ dart run tool/builder.dart --clean-before=db,zst

# Clean up source files after processing
$ dart run tool/builder.dart --clean-after=poetree

Note: Initial download is ~1.6 GB for all corpora. Extracted content uses ~21 GB.

Mock Database (Development/Testing)

For quick testing with sample data:

$ dart run tool/mock_db_generator.dart

Running Tests 🧪

To run all unit and widget tests use the following command:

$ very_good test --coverage --test-randomize-ordering-seed random

To view the generated coverage report you can use lcov.

# Generate Coverage Report
$ genhtml coverage/lcov.info -o coverage/

# Open Coverage Report
$ open coverage/index.html

📜 Attribution

This application uses poetry data from the PoeTree corpus provided under CC-BY-SA 4.0 license. The PoeTree project aggregates and standardizes poetry corpora from multiple sources across 11 languages.

If you use this application or its data in your research, please cite the following:

Dataset:

Plecháč, P., Šeļa, A., Bermúdez Sabel, H., Bobenhausen, K., Cinková, S., Dale, I. L., Delente, É., De Sisto, M., Haider, T., Hammerich, B., Horváth, P., Kvinnsland, R., Kočnik, N., Kolár, R., Korchagin, K., Martynenko, A., Mittmann, A., Nagy, B., Navarro Colorado, B., … Sitchinava, D. (2025). PoeTree. Poetry Corpora in Czech, English, French, German, Hungarian, Italian, Norwegian, Portuguese, Russian, Slovenian, and Spanish (1.0.0) [Data set]. Zenodo. https://doi.org/10.5281/zenodo.17414036

Article:

PoeTree: Poetry Treebanks in Czech, English, French, German, Hungarian, Italian, Portuguese, Russian, Slovenian and Spanish. (2025). Research Data Journal for the Humanities and Social Sciences, 9, 1-17. https://doi.org/10.1163/24523666-bja10044


About

Open-source mobile app for memorizing poetry using Spaced Repetition and Offline Speech Recognition (Sherpa ONNX). Built with Flutter.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •