PathfinderWiki:Semantic Data Initiative
TLDR
A change to the biggest templates and how they are used. Introduction of the Facts:
namespace. Making things easier to edit.
Reasoning
The wikis (Pathfinder + Starfinder) have had a lot of technical upgrades in the last year. These allow us to improve many parts of the wiki to make them more friendly to editors and readers. If we use these features we can make editing the wikis easier and give readers a better experience. The main advantage will be that we can generate indices much simpler. These are used basically everywhere on the wiki, e.g.:
- Artists have tables of the credits of their work as well as a gallery of their images in this wiki
- Authors have a list of the books they contributed to
- the new products slider shows the newest products released
- the release calendar is a list of all product releases
- the portal pages are lists of their respective things
- adventure paths contain a list of the products belonging to the adventure path
All of these require us to update information in multiple locations, which often does not happen.
Goals
- Split of facts from the articles themselves to create a solid knowledge graph.
- Make editing this knowledge graph easy to understand and edit.
- Use the knowledge graph to fill infoboxes and index tables.
- Add the ability to add sources to facts. (e.g. references)
- Keep the ability to add arbitrary information to infoboxes outside of the facts system.
- Make it easy to use knowledge graph facts within texts.
Non-Goals
- Change the fundamental workflow of editing articles.
How will this look in the future?
The article itself
The article itself will smaller since the infoboxes will be much reduced in size. This could look something like this for Absalom:
The facts page
Since the Absalom article concerns itself with the nation and the city there would be two corresponding facts pages. Facts:Absalom (City) and Facts:Absalom (Nation). We will use the City facts page for this example. It would look something like this:
There will also be an effort to have a form for editing facts pages instead of editing the wikitext directly to make it easier.
Steps
This is the step-by-step plan. Further substeps will be added when new steps are started.
Set up the general facts systemSet up facts namespaceCheck feasibility of using forms for fact pages
- Book + Book Content
Create the fact properties/formsCopy existing knowledge to the facts pagesCreate infobox based on facts systemCheck for starfinder specific differencesIntegrate Adventure template into new template on PF and SFIntegrate current Book template documentation to the book formReplace infoboxes in articles with fact based infoboxes (this is the moment where user facing changes happen)Replace content within articles with a new template- create credits templates that can be used on any author/artist page
update the book related Portal pages(no longer part of this as there is now a portal initiative)
- Update other product templates
AccessoryMapMiniaturesAudioVideo gameDeck
Change the new products slide and release calendar to be based on the facts systemproducts sliderrelease calendar
look into applying the facts system to creating nice references automatically- Create facts for automatic cross-referencing of named entities within all PDFs
- Add time events
- Other existing infobox types
- There has been no decision if these should or could be part of this initiative. They are included here for completeness sake.
- Abyssal realm
- Alchemical item
- Arcane school
- Biography
- City
- Class
- Company
- Cosmos
- Creature
- Deity
- Domain
- Hellknight Orders
- Help
- Item
- Magic item
- Nation
- Organization
- Person
- Planar vehicle
- Plane
- Prestige class
- Region
- RPG Superstar
- Ship
- Spell
- Spell2e
- Technological item
- Vehicle
- There has been no decision if these should or could be part of this initiative. They are included here for completeness sake.
Manual TODOs for book references
Resolve all ambiguous references here: https://pathfinderwiki.com/wiki/Special:WhatLinksHere/Template:Cite/Bestiary_(Disambiguation)-Oznogon (talk) 16:37, 8 February 2024 (UTC)- Look through the following pages and fix usage of {{Ref|note}}. Either remove duplicate usages of the note if appropriate or replace {{Ref|Book|page}} with
<ref name="abc">{{Cite/Book|page}}something</ref>
Jyotino ref|notes were on this article -Oznogon (talk) 16:39, 8 February 2024 (UTC)Loci spiritremoved note -Oznogon (talk) 16:44, 8 February 2024 (UTC)Octavio Sabinusremove note where not needed --Fleanetha (talk) 14:03, 8 February 2024 (UTC)Skrelyn Leissonremoved notes where not needed -Oznogon (talk) 16:50, 8 February 2024 (UTC)Psychic magicremoved notes where not needed -Oznogon (talk) 16:52, 8 February 2024 (UTC)Order of the Torrentremoved notes where not needed -Oznogon (talk) 16:52, 8 February 2024 (UTC)Hope's Hollowremoved notes where not needed -Oznogon (talk) 16:53, 8 February 2024 (UTC)Master of Spellsall notes are needed -Oznogon (talk) 17:10, 8 February 2024 (UTC)Lander Lebedaremoved notes where not needed -Oznogon (talk) 17:53, 8 February 2024 (UTC)Winter Councilall notes are needed -Oznogon (talk) 17:54, 8 February 2024 (UTC)Cathedral of Sancta Iomedaearemoved notes where not needed -Oznogon (talk) 17:56, 8 February 2024 (UTC)Voulgarghasall notes are needed; reverted to old format -Oznogon (talk) 17:56, 8 February 2024 (UTC)Qlippothmoved note out of ref -Oznogon (talk) 17:57, 8 February 2024 (UTC)Xerbystes IIremoved note re years on refs where that comment was not relevant --Fleanetha (talk) 13:18, 8 February 2024 (UTC)Kintargoremoved unnecessary notes -Oznogon (talk) 17:59, 8 February 2024 (UTC)Lichremove note where not needed --Fleanetha (talk) 13:44, 8 February 2024 (UTC)Dyrianna of House Avenstarremoved unnecessary notes -Oznogon (talk) 18:00, 8 February 2024 (UTC)Belkzen pumareverted to old format --Fleanetha (talk) 13:29, 8 February 2024 (UTC)Nivi Rhombodazzleremoved unnecessary notes -Oznogon (talk) 18:08, 8 February 2024 (UTC)
Semantic data cheatsheet
Adapted from Old School RuneScape Wiki.
This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License. |
Defining attributes
Code | Display | Function |
---|---|---|
[[foo::bar]]
|
bar | Defines the property "foo" as bar and creates a link to bar |
[[foo::bar|baz]]
|
baz | Defines the property "foo" as bar and creates a link to bar on the text "baz" |
[[foo::bar| ]]
|
Defines the property "foo" as bar and creates no text | |
{{#set:foo=bar}}
|
Defines the property "foo" as bar and displays nothing. Multiple properties can be defined this way.
Note: Use | |
-- setup data table - standard key-value pairs where key is property name and value is property value
local data1 = {
foo = 'bar',
['Has property2'] = 'value2'
}
-- set the properties
local result1 = mw.smw.set(data1)
if result1 == true then
-- everything fine
else
-- error message is in result1.error
end
-- setup data table - an array of strings, in format 'propname=propvalue'
local data2 = {
'foo=bar',
'Has property2=value2'
}
-- set the properties
local result2 = mw.smw.set(data2)
if result2 == true then
-- everything fine
else
-- error message is in result2.error
end
|
Used in lua modules to set data, similarly to the {{#set}} parser function - all methods are equivalent, so use whichever is easier for the module at the time. See SemanticScribunto documentation for more information.
| |
-- setup data table - multiple property values for one property
local data3 = {
foo = {
'bar',
'baz',
'qok'
}
}
-- set the properties
local result3 = mw.smw.set(data3)
if result3 == true then
-- everything fine
else
-- error message is in result3.error
end
|
As above, but setting multiple values to the same property. |
Retrieving attributes with #ask
Code | Function |
---|---|
[[Category:Foo]]
|
Finds all pages that are in category "foo" |
?foo
|
Shows the property "foo" of all results |
limit=X
|
Confines the displayed results to limit X |
offset=X
|
Begins the search at an offset of X |
[[foo::bar]]
|
Finds all pages that contain a property of "foo" that is equal to "bar" |
[[foo::!bar]]
|
Finds all pages that contain a property of "foo" that is not equal to "bar" |
[[foo::>X]]
|
Finds all pages that contain a property of "foo" that is greater than or equal to X |
[[foo::>>X]]
|
Finds all pages that contain a property of "foo" that is greater than X |
[[foo::<X]]
|
Finds all pages that contain a property of "foo" that is less than or equal to X |
[[foo::<<X]]
|
Finds all pages that contain a property of "foo" that is less than X |
[[foo::bar||baz]]
|
Finds all pages that contain a property of "foo" that is "bar" or "baz" |
Lua
For details on fetching information via lua, see mw.smw.ask documentation.
Retrieving attributes with #show
Code | Function |
---|---|
{{#show:Bar|?foo}}
|
Shows the property "foo" of page Bar |