Help:Datatype "Keyword"

From semantic-mediawiki.org
Keyword
Holds text of restricted length that is being normalised (similar to datatype Text)
Further information
Provided by: Semantic MediaWiki
Since version: 3.0.0
Until version: still in use
Datatype ID:
_keyw
In this wiki: Keyword
Table of Contents


The datatype Keyword is used to strings of restricted length.1 It is similar to datatype "Text"Holds text of arbitrary length, but has the following differences:

  • Keywords are restricted in length (150 for ASCII, 85 for UTF-8)
  • they are normalized (lowercased, removed diacritics)
  • the original annotation value is kept but during a query request the normalized value is used to match the broadest possible result set which means whether you use teSt, TEST, or test the normalized version will always match the keyword test
  • Keywords allow to add a formatter rules (see below) which will self link any keyword to a link_to target to have immediate access to entities that have the same normalized keyword annotated

Formatter rule[edit]

Any keyword typed property can have its own formatter rule assigned which defines how links should be generated. For details, see Help:Schema. If the property has no formatter rule then it just displays the annotated value.

Examples[edit]

API example

See also[edit]

References

  1. ^  Semantic MediaWiki: GitHub pull request gh:smw:3020