Skip to main content

A language learning utility with Anki integration

Project description

Ankipan

Ankipan is a project to democratize language learning in a decentralized way.

It allows you to choose which domains you want to be more fluent in, and creates a custom learning curriculum that aims to get you to your goal as effectively and efficiently as possible. First, specify what kind of fields you would like on your flashcard: What definitions from open online dictionaries do you prefer? What kind of example sentences would you like to have on your flashcards to use a reference? (e.g. youtube subtitles, wikipedia, open news corpora etc.) Then, you can parse any text you are interested in from a wide variety of formats. (text, subtitle, pdf, html, or a source from an ankipan database) Ankipan generates a frequency-sorted list of root words, and provides you with tools to choose which words you would like to learn and generates the corresponding Anki flashcards for you. Inside of Anki, you can color-tag the example sentences that are the most useful for you, and the flashcard will remember them and expand those sentence fields for you the next time you review the card. Example sentences contain gpt-generated translations and explanations, which you can currently either generate with with the ankipan_default db server that I am privately hosting, or by utilizing your own google gemini API key or local ollama installation if there are currently too many GPT requests (see ankipan/gpt_base.py).

New fields can easily be added in a modular way by creating a new file in the ankipan/flashcard_fields directory. Ankipan can connect to any number of servers containing a pre-parsed db of different text sources, e.g. to collect example sentences or utilize GPT resources for translations/explanations and other fields. (ankipan.Config.add_server(name, url), for hosting a server see https://gitlab.com/ankipan/ankipan_db)

Getting started

1. Prerequisites

2. Installation

  • Using pip:
pip install ankipan
  • From source:
git clone git@gitlab.com:ankipan/ankipan.git
cd ankipan
pip install .

3. (Optional) Install lemmatizers to parse your own texts

pip install stanza HanTa

Usage

See notebooks in /examples

Notes

  • Current lemmatization is done via the stanza library in the reader.py module. While this works mostly fine, the library still just uses a statistical model to estimate the likely word roots (lemmas) of the different pieces of sentences. It sometimes makes mistakes, which requires the users to manually filter them in the select_new_words overview, or suspend the card later on in anki.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ankipan-0.6.tar.gz (62.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ankipan-0.6-py3-none-any.whl (58.0 kB view details)

Uploaded Python 3

File details

Details for the file ankipan-0.6.tar.gz.

File metadata

  • Download URL: ankipan-0.6.tar.gz
  • Upload date:
  • Size: 62.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.11

File hashes

Hashes for ankipan-0.6.tar.gz
Algorithm Hash digest
SHA256 e7e711f080ca4fc7a80cc0e50735a37fc4e4d56c9948d24519b0ee3d4db441a8
MD5 6ef7d81868f32be5bcbf53c9a53c690e
BLAKE2b-256 ee6dc205ce87fd16e889941c09606e2885ac5aecbe67e9d97be43401f823ea5a

See more details on using hashes here.

File details

Details for the file ankipan-0.6-py3-none-any.whl.

File metadata

  • Download URL: ankipan-0.6-py3-none-any.whl
  • Upload date:
  • Size: 58.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.11

File hashes

Hashes for ankipan-0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 02f627c5659c090c2b4ef1001ee8833a8b79be7e075672824e6c2bf8dfc9e6b3
MD5 8a63c28022fcac8e46b7ec38f685e8ec
BLAKE2b-256 d65c7add2c2bd24f6203185568336a858fd267fe2d1a34cb4858f8b54b549a0f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page