Aus SubmersWiki

Wechseln zu: Navigation, Suche

Below is a sample use-case which may be used to find related matches using ASK-queries:

 <ask>[[hasThing:~color]]</ask> 

The number of ~ signs in the syntax denotes the number of typos that are allowed and taken into account. In reference to this example, all attribute values with distance of "1" to colour are considered as correct matching, positive results! That means, colour, Color, culor and so on would deliver results.

The near matches are not only limited to mistyped string attributes but also useful regarding float numbers.

Following on,

<ask>[[Category:Person]] [[*:=*]] [[wasBorn:~~~2007-05-11]]</ask>

would result in a list showing all attributes of all persons that were born between 2007-05-08 and 2007-05-14 (3 days deviation due to the 3 ~ signs.

In reference to integer units, the number of ~ signs denotes the factor of a fixed tolerance of 5%.

<ask>[[hasPopulation:~~100000]]</ask>

Such a query would match all pages that contain the hasPopulation attribute with a value of at least 90000 or at most 110000 (10% deviation due to the 2 ~ signs).

A note for administrators - Installation instructions

A new function for calculating the edit distance needs to be added to the existing MySQL server. A detailed installation instruction and the necessary file containing the needed method is available in the CVS: extensions/SemanticMediaWiki/libs/INSTALL.TXT


Copyright © 2009 Ontoprise GmbH.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the article "GNU Free Documentation License".


Diese Seite wurde zuletzt am 25. November 2010 um 16:01 Uhr geändert.Diese Seite wurde bisher 1.645-mal abgerufen.