Extension:WikiLexicalData

In a standard MediaWiki installation, all the text of a page is entered in one field, and stored in one entry of the database (page_text).

WikiLexicalData (previously named Wikidata) allows to configure some namespaces to use several fields of different types (text, Combobox, etc.) on one wikipage and to store these fields in a structured database.

OmegaWiki is the only implementation of WikiLexicalData so far. The structured database used at OmegaWiki is explained at http://www.omegawiki.org/Help:OmegaWiki_database_layout

Requirements

 * PHP together with the PHP intl extension to handle Unicode normalization

Installation
You can either install with an existing copy of a WikiLexicalData database (for example with the OmegaWiki database, see ), or install from scratch on any MediaWiki installation, as explained below.


 * 1) Checkout a copy of the latest "WikiLexicalData" extension
 * 2) * from the previous folder, go into mywiki/extensions/ and execute:
 * 3) In order to create the tables in the database relating to WikiLexicalData
 * go to
 * run
 * you can change the prefix and the datasetname to whatever you like. It has not been tested, but it should work...
 * you can change the prefix and the datasetname to whatever you like. It has not been tested, but it should work...

Configuration
require_once("$IP/extensions/WikiLexicalData/App.php");
 * Edit you LocalSettings.php and add,

$wgCapitalLinks = false;

$wgExtraNamespaces = array(       16 => 'Expression',        17 => 'Expression_talk',        24 => 'DefinedMeaning',        25 => 'DefinedMeaning_talk', );

$wdHandlerPath = "$IP/extensions/WikiLexicalData/OmegaWiki/"; $wdHandlerClasses = array(       24 => 'DefinedMeaning',        16 => 'OmegaWiki', );

$wgDefaultClassMids = array(37); $wgIso639_3CollectionId = 35;
 * Also add the following (the numbers may vary), as suggested by the install script:
 * $wgDefaultClassMids should correspond to the DM number of the expression called "lexical item".
 * If you edit that expression, in the Section "Class attributes", you can add annotations that will be available for all languages. For example:
 * - Level: SynTrans, Attribute: IPA , Type: Plain Text. Note: you have to define the word "IPA" first
 * - Level: SynTrans, Attribute: etymology , Type: Translatable Text.
 * - Level: SynTrans, Attribute: part of speech , Type: Option list.
 * - Level: DefinedMeaning, Attribute: image , Type: Link. This is apparently not true since years now, and noone answers questions about how to add attributes. --Purodha Blissenbach (talk) 04:12, 22 March 2014 (UTC)

Languages

 * To add other languages
 * Use the language manager ( Special:Languages )
 * If you add a DM for that language, and add it to the "ISO 639-3 collection" with its ISO code, it will be used to translate the language name according to the interface language ( Use Special:ImportLangNames ).

User rights
Default user rights are as follows: $wgGroupPermissions['wikidata-omega']['editwikidata-uw'] = true; $wgGroupPermissions['wikidata-omega']['deletewikidata-uw'] = true; $wgGroupPermissions['wikidata-copy']['wikidata-copy'] = true; $wgGroupPermissions['wikidata-omega']['wikidata-copy'] = true; $wgGroupPermissions['bureaucrat']['languagenames'] = true; $wgGroupPermissions['bureaucrat']['addlanguage'] = true; $wgGroupPermissions['bureaucrat']['addcollection'] = true; $wgGroupPermissions['bureaucrat']['editClassAttributes'] = true; $wgGroupPermissions['bureaucrat']['exporttsv'] = true; $wgGroupPermissions['bureaucrat']['importtsv'] = true;


 * : rights to edit the lexical data pages and add new data. This permission can be given to anonymous users.
 * : rights to modify existing data, such as change a definition or remove a translation.
 * : rights to add new languages via Special:Languages.
 * : rights to update the translations via Special:ImportLangNames.
 * : rights to add a collection via Special:AddCollection.
 * : rights to add attributes to a class.

Sorting
To have proper sorting of diacritics, such as "é" between "e" and "f", you might have to add this to your LocalSettings.php:

Search suggest
To have the search suggestion use the expression namespace instead of the article namespace:
 * edit
 * replace  with.