linguist

command module
v0.0.0-...-51662ed Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2019 License: MIT Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Linguist

This is early days for this project, and it has been throwned together in short order as a proof of concept. Everything is subject to change.

linguist is a command-line tool to practise translating sentences between languages.

$ linguist --lang de 
Translate: Hi
> Hallo
✓

Translate: Run
> Lauf
✓

Translate: Wow
> Plotzinger
✘ Potzdonner
  Donnerwetter

Translate: Fire
> Feuer
✓

Translate: Help
> Hilf
✓

Installation

go get -u github.com/KyleBanks/linguist

How It Works

A translation dataset is loaded from the dataset directory, which contains tab-delimited translation pairs from a native language to the language being learned. For example, the most basic samples from the English -> German dataset look like so:

Hi.	Hallo!
Hi.	Grüß Gott!
Run!	Lauf!
Wow!	Potzdonner!
Wow!	Donnerwetter!
Fire!	Feuer!
Help!	Hilfe!
Help!	Zu Hülf!

A sample is picked from the dataset and the user is prompted to enter the translation. A simple Levenshtein Distance measurement is done on the sanitized input and possible translations, which is used to determine if the user entered the correct translation.

TODO

There's a lot of work to make this a useful tool, and contributions are greatly appreciated:

  • Difficulty scaling
  • Randomization
  • Non-binary results (when answer is close enough but not perfect, display the correct response)
  • Mode variations (Translate from Native, Translate to Native)
  • Additional language datasets (currently only supports learning German for native English speakers)
  • Improvements to the game UI (colors, etc.)
  • Improvements to validations (currently uses a simple/static levenshtein distance comparison. This should at the very least scale based on the sample difficulty)
  • General code/structure improvements

Acknowledgements

Translation dataset provided by https://tatoeba.org.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址