8000 GitHub - Ting2004/Influx: An integrated content-based language learning environment under development.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
forked from chaosarium/Influx

An integrated content-based language learning environment under development.

Notifications You must be signed in to change notification settings

Ting2004/Influx

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Influx

Prototype for an integrated content-based language learning environment.

wakatime

Links

How it looks like right now, with working multilingual sentence segmentation and tokenization:

preview img

Development notes

Architecture

  • SurrealDB + Axum + Disk as backend service exposing an API
  • Python + Stanza via PyO3 for NLP
  • Svelte frontend that interacts with the API
  • Tauri as a desktop client
  • fsrs-rs for SRS algorithm

Plan

(only a partial plan)

Phase I - Project Skeleton

  • file system content access
  • working vocabulary database
  • allow python scripting for extendable language support
  • text processing: tokenization, lemmatization, and sentence segmentation
  • document query api
  • basic text reader
  • token data write requests and confirmations
  • svelte routing structure
  • read toml language configurations
  • read toml application configurations
  • language-specific file listing
  • ensure uniqueness of vocabulary database entries

Phase II - Packaging

Phase III - Frontend Usability

  • feedback messages

Phase IV - Frontend Language Learning Features

  • dictionary
  • translation
  • TTS
  • sentence structure analysis?

Phase V - Code Quality

  • error handling
  • documentation
  • security and accounts?

Phase ? - Future

  • markdown rendering?
  • video support
  • audio support
  • pdf + ocr support?

For future self

  • Use toml = "0.8.8" for toml settings parsing and editing.
  • Current implementation is for rapid development. Change all unwrap to proper error handling.
  • File on disk could lead to race condition, but probabily won't encounter in single user situation
  • Language settings could be on disk
  • security? account? whatever for now as it's localhost

Running development server

Setting up python

Try not using conda, it didn't work Try not using mac's built-in python, it didn't work Installing stanza in virtual environment doesn't work for some reason. have to install it on the system python

brew install python@3.10
brew install pipenv
python3.10 -m pip install stanza
pipenv install
pipenv shell

rm /opt/homebrew/Cellar/python\@3*/**/EXTERNALLY-MANAGED

Running influx server

cd influx_api
cargo run

Running frontend

cd influx_ui
npm run dev

API design

Method defaults to GET is unspecified

  • / returns something random
  • /settings returns app settings as json
    • /langs returns list of languages in settings
  • /vocab to work with vocabs
    • /vocab/token/{lang_identifier}/{orthography} to query for a single token?
    • POST /vocab/create_token to create a token
    • POST /vocab/update_token to update a token
    • DELETE /vocab/delete_token to update a token
  • docs to work with docs
    • /docs/{lang_identifier} returns list of content, with metadata, for the language specified by lang_identifier. Currently only supports markdown content.
      • /docs/{lang_identifier}/{filename} returns a specific piece of content, with metadata, text, tokenised text, and results from querying vocabulary database

About

An integrated content-based language learning environment under development.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 76.2%
  • Svelte 18.9%
  • JavaScript 3.2%
  • Python 0.7%
  • HTML 0.5%
  • TypeScript 0.3%
  • CSS 0.2%
0