GSOC 2013 Improvement of glossary tools

=Project= Name: Improvement of glossary tools Public URL: http://www.mediawiki.org/wiki/User:Zhenya Announcement: http://lists.wikimedia.org/pipermail/wikitech-l/2013-April/068991.html Bugzilla report: https://bugzilla.wikimedia.org/show_bug.cgi?id=47981

Mentors:  Stephan Gambke and  Yury Katkov

By:  Yevheniy Vlasenko

= Synopsis = Presently there are two extensions for handling glossaries in MediaWiki: Lingo and Semantic Glossary. Lingo searches each viewed wiki page for the occurrence of the terms defined in the glossary and - when hovered over with the mouse - shows a tooltip with the respective definition. It uses a dedicated wiki page to store the terms and definitions of the glossary. Semantic Glossary is an extension to Lingo that uses semantic data stored in a Semantic MediaWiki store instead of Lingo's dedicated wiki page. This project is aimed to remove bugs and improve the functionality of Lingo and Semantic Glossary.

=Deliverables=

This section will be developed to document considerations and decisions on design and implementation during the course of the project.

Support for multiple definitions per term
Current situation: The user can specify one defition for each term. To specify a second defintion a complete new glossary entry is necessary.

Goal: Users shall be able to enter more than one definition per term. When the tooltip appears, it shall display all definitions.

Support for inflection
Current situation: Inflected forms of terms have to be set manually:
 * in Lingo with the help of special markup
 * in Semantic Glossary with the help of semantic properties

Goal: Inflected forms of terms shall be recognized automatically, e.g. by using stemmers.

Customizing the tooltip by using a template
Current situation: The tooltip displays the definition of the term exactly as specified in the glossary without any formatting done.

Goal: It shall be possible to specify a template to be used to format definitions. The mechanism for specifying the template needs to be investigated. Possibilities could be specification with the glossary entry, specification with the viewed page or wiki-wide specification in a wiki setting variable.

Ability to turn off the recognition of glossary terms in certain places
Current situation: The marking up of terms can be turned off for complete pages by using a magic word (__NOGLOSSARY__) or for portions of a page by wrapping them in a html element (e.g. a span) and setting its class to "noglossary".

Goal: On the viewed wiki page there shall be a button "This is not a term". When the button is pressed, the word shall not be highlighted as a term for this page in this place. The wiki shall remember that the word should not be highlighted as a term even if the page has been modified. An intermediate step would be to first provide a wiki tag to turn off the marking up for portions of a page.

Context support (for Semantic Glossary)
Current situation: All terms and definitions in the glossary are used when marking up a viewed page. If a term has more than one definition, all definitions are shown.

Goal: It shall be possible to specify which definition (if any) is applicable for each occurrence of a term. A mechanism for specifying the applicable definition needs to be investigated. Possible solutions could be to specify the applicable definition per occurrence of the term or to specify in the glossary with each definition the context where it is applicable, e.g. category or namespace of the viewed page.

Integration with FlaggedRevs/ApprovedRevs
Current situation: The most recent version of the glossary is used.

Goal: Integration with FlaggedRevs/ApprovedRevs, i.e. only approved revisions of the glossary (or of terms) shall be taken into account for marking up viewed pages.

=Monthly Reports=

June
This month I've finished those my tasks connected with Lingo Extension:


 * Finished the Community Bonding Period Checklist
 * Implemented "Ability to turn off the recognition of glossary terms in certain places. Phase 1: tags" in Lingo
 * Implemented "Support for multiple definitions per term" in Lingo

Here is a gerrit of my commits.

=July=


 * Support for word forms. Phase 1: support for synonyms in Semantic Glossary
 * Integration with FlaggedRevs/ApprovedRevs for Lingo


 * Customizing the tooltip by using a template(for Semantic Glossary)