1. Artur Barseghyan
  2. antonyms

Overview

HTTPS SSH

antonyms

A tiny program to sharpen your skills in Dutch language.

Reads the CSV file with questions and answers (word <-> antonym), pops them one by one in terminal and asks user to give his answer. Keeps track of correct and incorrect answers. At the end prints statistics.

Usage

It's recommended to prepend a \ (single backslash) to argument values.

Command line syntax

usage: antonyms.py [-h] [-f SOURCE_FILENAME] [-d DELIMITER] [-q QUOTECHAR]
[-l LOG_FILENAME]
optional arguments:
-h, --help show this help message and exit
-f FILENAME, --file FILENAME
 Source CSV file to read from
-d DELIMITER, --delimiter DELIMITER
 CSV delimiter
-q QUOTECHAR, --quotechar QUOTECHAR
 CSV quote char
-r REMOVE_IF_ANSWERED_WRONG, --remove-if-answered-wrong REMOVE_IF_ANSWERED_WRONG
 Remove if answered wrong
-l LOG_FILENAME, --log LOG_FILENAME
 Log to file to write to
--no-lowercase If given, sources would not be converted to lowercase
--respect-newlines
 If given, new line characters in sources would be automatically converted to new lines

Examples

From your terminal (console) type:

python antonyms.py

With custom file:

python antonyms.py -f your-custom-file.csv

With custom file, if you want to automatically convert new lines characters n to new lines and do not convert all source texts (questions and answers) to lowercase:

python antonyms.py -f your-custom-file.csv --no-lowercase --respect-newlines

With custom file and CSV delimiter:

python antonyms.py -f your-custom-file.csv -d \\,

With custom file and CSV quote char:

python antonyms.py -f your-custom-file.csv -q \\"

With custom file, CSV delimiter and quote char:

python antonyms.py -f your-custom-file.csv -d \\, -q \\"

Interactive console

The following commands are always available in the interactive console

  • \st (single backslash + s): Displays statistics.
  • \q (single backslash + q): Stops the test.

Dictionaries

Dictionaries should be in a valid CSV format. Place your files in dictionary directory.

Default format settings

  • Separated by comma (,) - so called delimiter
  • Text delimiter double quote (") - so called quote char

Example

  • dik, dun
  • klein, groot
  • nauw, breed
  • lang, kort