Leksa
Leksa needs more documentation.
Background
To be included here: A list of relevant files. While waiting, see this document
Installation
for sjd and sma
Make a backup of the database (there is a script for it in the db_bakup directory).
for the other languages
Note that your .bashrc path must be ok. In .bashrc on the machine where
Installation is performed via ./install.py with one option. The
python2.6 install.py --file/-f XML
Also, superset must be indicated (the sjd here should be
python2.6 install.py --sem sjd/meta-data/semantical_sets.xml
For sme and sma installation of Leksa
./install.py --file XML --tagfile tags.txt --paradigmfile paradigms.txt
Files and classes
I'm organizing these to reflect somewhat what the structure is for dependencies and methods that call what. In Leksa (as in other games), methods and classes in views.py call objects in game.py, which call objects in forms.py
- settings.py
- INFINITIVE_SUBTRACT, INFINITIVE_ADD - settings for adding and subtracting infinitive markers; dictionaries of regular expressions.
- OLD_NEW_ISO_CODES - used in producing the corresponding language pair for the user's browser language settings. If more languages are added, this must be altered.
- INFINITIVE_SUBTRACT, INFINITIVE_ADD - settings for adding and subtracting infinitive markers; dictionaries of regular expressions.
- conf/tools.py
- switch_language_code
- views.py
- leksa_game
- Quizzview
- leksa_game is called, which uses Quizzview to set up a lot of common variables, and then a response is returned. This is where the browser language is checked and a game is produced based on those settings.
- Quizzview handles the processing of the settings form, and GET and POST data. GET is available so that outside courses can link directly to certain exercises, and in addition, Quizzview handles instantiating game.QuizzGame, and setting various template variables.
- Docstrings and comments on these methods should explain a little more in depth
- leksa_game is called, which uses Quizzview to set up a lot of common variables, and then a response is returned. This is where the browser language is checked and a game is produced based on those settings.
- leksa_game
- game.py
- relax - spell relaxing, used in all games where user input is accepted in South Sámi
- QuizzGame - The whole goal of QuizzGame is to produce a LeksaForm object. To do this, it initializes variables (QuizzGame.get_db_info), and then queries the database and creates the form (QuizzGame.create_form). As QuizzGame is a subclass of Game, there are many relevant methods there, such as init, and new_game (called by *** Game in views.py), as well as check_game
- Docstrings and comments on these methods should explain a little more in depth
- relax - spell relaxing, used in all games where user input is accepted in South Sámi
- forms.py
- LeksaSettings
- LeksaQuestion
- SEMTYPE_CHOICES - These correspond to semtypes both in semantical_sets.xml (the supersets) and one or two in the actual lexicon files.
- TRANS_CHOICES - keys representing language pairs, with 3-character ISO codes corresponding to the iso codes used in lexicon files. ZZZWWW
- GEOGRAPHY_CHOICES - Choices corresponding to lexicon files.
- LeksaSettings
- semantical_sets.xml
- This file is in sme/xml in Ur-Oahpa, in LANG/meta-data in sma-type Oahpa versions.
- It contains the supersets (not found in the xml files) and their subsets
- This file is in sme/xml in Ur-Oahpa, in LANG/meta-data in sma-type Oahpa versions.
templates/smaoahpa_main.html templates/smaoahpa.html smadrill/templates/game.html smadrill/templates/leksa.html smadrill/templates/leksa_place.html