Extension:AskQ

Description
AskQ! is an extension for Semantic MediaWiki that aims to make it easier for users to perform semantic queries without having to know the Ask query syntax. In addition, it modifies Special:Ask to provide a facet browser on top of the normal results display. A list of the most-used properties for pages in the result set is shown, with the ability to select and de-select properties and have the result reload dynamically.

A running demo is avaiable at:

The development of AskQ is sponsored by Active.

Download
AskQ! can currently be downloaded via SVN at https://svn.aifb.uni-karlsruhe.de/external/atwl/extensions/atwl
 * username: askq
 * password: askq

Installation
AskQ! requires Semantic MediaWiki to be installed first. After downloading AskQ! from the link above, add the following to your LocalSettings.php:

Usage
AskQ! works by splitting a user's query into words and phrases and trying to find matching pages, categories, and properties in the SMW database for possible permutations of elements. The most likely interpretation is then converted to the Ask query syntax, and the user is shown a standard Special:Ask page with additional AJAX faceted browsing capabilities, allowing the full range of Semantic Result Formats to be used. It does not currently have much support for dealing with misspellings or spelling variations of terms that exist in the database, and the types of queries that it can process is finite. User input is not case-sensitive. Some structures handled include:


 * A Category (or Concept) followed by some properties:
 * "person email homepage"
 * A Page followed by some properties:
 * "Germany population"
 * The query doesn't need to specify a subject:
 * "located in Germany"
 * Properties can specify values:
 * "tool status stable license GPL homepage" (will result in, although see below for how to disable  )
 * Support for wildcards and comparators:
 * "tool license not GPL" or  "country population less than 100000" or "person name like Dan" or "actor born in *"

Settings
A few PHP variables in keywordsearch/SKS_Settings.php affect AskQ's behavior.
 * controls the example queries that are shown to the user on the search input page.
 * enables logging of queries and result choices using MediaWiki's logging facility
 * adds Property::+ to the query for all detected properties if true (the default). So, "person email homepage" will only show pages in Category:People with both Property:Email and Property:Homepage values existing.
 * adds ?Property to the query for every Property::X in the interpreted query. Thus, "software license GPL" will display the property License for every page in the result.  This is true by default.