Difference between revisions of "Talk:Semantic Wiki"

From BattleMaster Wiki
Jump to navigation Jump to search
(request for info on external data updates)
 
(42 intermediate revisions by 8 users not shown)
Line 2: Line 2:
 
It would be a good idea for people who post ideas to remove them or clean them up when they are moved to the front page, or we decide they are not appropriate. This page will rapidly get too cluttered with old idea to follow the current discussion. --[[User:Indirik|Indirik]] 18:10, 5 February 2009 (UTC)
 
It would be a good idea for people who post ideas to remove them or clean them up when they are moved to the front page, or we decide they are not appropriate. This page will rapidly get too cluttered with old idea to follow the current discussion. --[[User:Indirik|Indirik]] 18:10, 5 February 2009 (UTC)
  
 +
== Special Characters in Character Names Breaks Things ==
 +
Check the Lord's name here: [[Partora]]. It breaks the semantic coding. I tried dong a <nowiki>[[has lord::<nowiki>...</nowiki></nowiki>]], but got an error. --[[User:Indirik|Indirik]] 16:52, 25 March 2009 (UTC)
 +
:Yeah, that character desperately needs renaming. The name wouldn't even be possible anymore today. --[[User:Tom|Tom]] 18:34, 25 March 2009 (UTC)
  
== Kudos ==
 
Once the battlemaster data can be extended to the wiki to remove manual inputs and have the wiki truly automaticly update itself, we'll be in a whole new, more user-friendly era of the game's wiki. The game could then compensate for the holes this will leave in the wiki's history files (okay, Bob is ruler now, but who was before him?), by having its own history logs which would also be a lot more accurate and reliable than manual inputs (if a page is only modified twice in three years, there is a good chance that there is a few judges and generals that have passed between both versions of the page). Anyways, I'm seeing great potential for this. First application I started is for realms, with functions for each council positions, number of nobles, of regions, the population, largest city, capital, state religion, and government type, though this could also be extended to include estimated food and gold production, as is available IG. Religions could also use their own system, as other cases could... We'll need a page like Meta:Style Guide so that we don't start seeing clone functions ("Island" and "Continent", for example). Anyways, this is quite an amazing step forward for the game's wiki, kudos for that. -[[User:Chénier|Chénier]] 04:31, 4 February 2009 (UTC)
 
  
 +
== Maps Service ==
 +
Using [http://semantic-mediawiki.org/wiki/Help:Service_links Service Links] we can easily add links to region detail pages and other backlinks into the game (family pages, etc.)
  
== Infoboxes ==
+
== Various Ideas ==
We have a lot of templates for stuff like region or realm info. Unfortunately, there are several competing options, such as [[Template:Infobox Regions]] and [[Template:Infobox region]].
+
::"member of" should cover family relations. The cool thing is that you can also model actual relations using semantic terms, so "son of" and "father of" works great, as does "brother of". I'll add a category for that. --[[User:Tom|Tom]] 06:40, 5 February 2009 (UTC)
 
+
:Maybe a "was member of" for former realms.--[[User:Athins|Athins]] 18:41, 5 February 2009 (UTC)
To avoid confusion, I suggest we take one of them, a good, clean one (I'd go with [[Template:Infobox region]] from the above list) and modify it for semantics, then put it up and update all region pages. I can automatically create the template data from the database, that would make things a ton easier.
+
:: That's an interesting idea, but it would also require further annotations, specifically dates. Anyone know if there's a way to express things like "was a member of X from (date A) until (date B)" ?
 +
:: I think this could be done using [http://semantic-mediawiki.org/wiki/Help:Many-valued_properties Many-valued properties]. --[[User:Tom|Tom]] 13:42, 7 February 2009 (UTC)
 +
::Following that idea(which I like, but could see troubles with), I think we need a had ruler/judge/general/banker/capital etc. function for lost realms or for just former people in those offices. This could apply to lordships as well and begin to collect a database of claims when you view former council members, regions, lords etc. --[[User:Bishamon Family|Vita Family]] 15:06, 8 February 2009 (UTC)
  
We should also have a good naming scheme. Something like the "Infobox" prefix, which appears to be widely popular. Someone with an idea for an equally catchy term?
+
== Calculating realm population ==
  
:Speaking from a slightly biased point of view, I'd dump all the separate templates and go with the [[RealmBox Project]]. I'm sure I could modify that one to include the necessary semantic stuff. Especially through the use of the [[RealmBox Project/Preconfigured Templates|composite templates]]. RealmBox can also be configured to be used for regional infoboxes and religion boxes, too, as shown in [[RealmBox Project/Customizing]]. Using RealmBox people can still have their realm's template look different, but be based on the same template.
+
OK, I'm calculating population, using this query:
  
::I agree with Indirik. In fact, I was already working to get everyone to use Realm Box, but I didn't want to just trample through all their templates without asking about changing it so its been slow progress. --[[User:Bishamon Family|Vita Family]] 14:58, 4 February 2009 (UTC)
+
<pre>{{#ask: [[part of::Keplerstan]] | ?population | format=sum }}</pre>
  
:::Good, let's do that. Set the Realm Box up for semantic and then move everything over. Quite a few of the templates in existence are not used at all, so we could also remove them. See [[Special:UnusedTemplates]]. --[[User:Tom|Tom]] 17:16, 4 February 2009 (UTC)
+
It works and gets the right answer, but with one problem: it wraps the answer in <nowiki><p>...</p></nowiki> tags, like this:
  
::::Unused Templates are deleted. --[[User:Bishamon Family|Vita Family]] 18:17, 4 February 2009 (UTC)
+
<pre>The population of Keplerstan is {{#ask: [[part of::Keplerstan]] | ?population | format = sum }} commoners.</pre>
  
=== Options for Region Info templates ===
+
The population of Keplerstan is {{#ask: [[part of::Keplerstan]] | ?population | format = sum }} commoners.
The following ones have been - more or less completly - modified to include semantics:
 
* [[Template:Infobox Regions]]
 
* [[Template:Infobox region]]
 
* [[Template:Region]]
 
* [[Template:Infobox_Regions_Small]]
 
* [[RealmBox Project]] - Can be easily configured for regions as shown here: [[RealmBox Project/Customizing]]
 
  
=== Options for Realm Info templates ===
+
This only seems to affect the "sum" format. The "list" format doesn't do this:
(add those you found)
 
* [[RealmBox Project]] - Composite but customizable) realm templates can be seen here: [[RealmBox Project/Preconfigured Templates]]
 
  
 +
The population of Keplerstan is {{#ask: [[part of::Keplerstan]] | ?population= | mainlabel=- | format = list }} commoners.
  
== Proposed Terms ==
+
Anyone have any ideas? This is *really* annoying.
 +
--[[User:Indirik|Indirik]] 23:41, 25 February 2009 (UTC)
  
Here's a list of terms I came up with that we could use:
+
:Looks like being a "feature" of the sum format.  --[[User:Tom|Tom]] 07:32, 26 February 2009 (UTC)
 +
:Testing if this is also for the other math functions:
 +
:The max population in Keplerstan is {{#ask: [[part of::Keplerstan]] | ?population | format = max }} commoners.
 +
:The min population in Keplerstan is {{#ask: [[part of::Keplerstan]] | ?population | format = min }} commoners.
 +
:The avg population in Keplerstan is {{#ask: [[part of::Keplerstan]] | ?population | format = average }} commoners.
  
'''hierarchical relations'''
 
* "part of" - denoting that a region is part of a realm, duchy, etc. and similar cases where one object belongs to another
 
* "member of" - is the equivalent for persons, e.g. a character is a "member of" a realm, or a religion, etc.
 
* "located on" - is for geographical relations. We could use "part of" for this, but the relation is different and "located on" can also be used for unique items, religions and even people, so it's more general
 
* "capital of" - is a special relation, and quite specific because it will be searched for. This is to be put ''on the region page'', i.e. "Madina (City)" would contain <nowiki>[[capital of::Madina (Realm)]]</nowiki> the inverse would be "has capital" (see below)
 
  
* "... of" - is the general variant of "capital of", it is mostly intended for things like "judge of", which could be used on a character page to detail positions. examples:
+
== Region properties ==
** ruler, general, judge, banker (of a realm)
 
** knight or lord (of a region)
 
* "has ..." - is the inverse of the above "... of" relationship, e.g. a realm <nowiki>[[has judge::xxx]]</nowiki>
 
  
'''region data'''
+
The [[New Economy]] appears to assign two major resource types to each region. How about assigning semantic properties for these? That would allow us to easily create a list of all regions that have, for example, stoneworks, or mining. Perhaps: <nowiki>[[has resource:: ... ]]</nowiki>? Maybe we could then even dynamically list the resource types produced by a realm... --[[User:Indirik|Indirik]] 20:40, 20 March 2009 (UTC)
* population
+
:It's not that simple, but I agree in principle. The thing is that this is not a list of available resources, it expresses something different. Let's wait with that until the system is done. --[[User:Tom|Tom]] 18:36, 25 March 2009 (UTC)
* region type
 
* location feature - this expresses things like mountains, rivers, coast, etc.
 
* gold production
 
* food production
 
* location
 
* weather area
 
  
'''realm data'''
+
== [[:Template:Pie]] ==
* government is - the type of government
+
I've not done much research into this Semantic wiki stuff, but would adding a Semantic query to [[:Template:Pie]] (referenced by [[New Attributes]]) be appropriate/possible? Something like <nowiki>{{#show: {{PAGENAME}} | ?attributes}}</nowiki> (which, when rendered, would be <nowiki>{{#show: [[November_Family/Calvin]] | ?attributes}}</nowiki> for this character)? --[[User:Calvin November|Calvin November]] <sup>[[User talk:Calvin November|t]]</sup>/<sub>[[Special:Contributions/Calvin_November|c]]</sub> on 06:55, 21 February 2009 (UTC)
* founding date
+
:Not worth the effort right now, because it's not certain the new attributes are ever going to go active. --[[User:Tom|Tom]] 12:07, 21 February 2009 (UTC)
* state/official/main religion (one term, please - I suggest "has official religion" - a "main" religion could a) change over time and can b) be determined automatically in theory.
 
  
'''guild and religion data'''
+
== Articles and News ==
* founding date
 
* has founder (who created it, especially for religions) - the inverse would be "founder of"
 
  
'''unique items data'''
+
Should we also put semantics on articles and news? We could use something like "about" or "news date" and it would allow us to do searches on articles across the various newspapers, generate timelines and other interesting stuff. --[[User:Tom|Tom]] 21:38, 4 March 2009 (UTC)
* discovered date
 
* discovered by
 
* (something to indicate if the item is presently owned by someone or lost, maybe?)
 
* has special bonus
 
  
'''characters'''
+
:That is an interesting idea. An "about/topic/keyword" attribute could be very nice. As to date, is that really a viable option? As far as I know, the timeline only points to the page name on which the property is placed. This means that the date would point to, in the case of the Dwilight Daily, something like "Dwilight Daily/2009/January", and that would be what appears on the timeline. Or can you somehow give a date property a secondary value with an article name? Or do we need to rethink the way newspapers are done? TO be honest, I haven't had a lot of time to investigate timelines. --[[User:Indirik|Indirik]] 22:35, 4 March 2009 (UTC)
* "father/son/brother/etc of" - this can denote actual family relations. Membership in a family would, of course, be described as "member of".
 
  
-Tom
+
::Yes, we would probably have to do that. [http://semantic-mediawiki.org/wiki/Timeline] shows how this works, and it does have one page per news. Unfortunately, multi-valued properties can not be used in timelines. But if nothing else works, we can look into the code and check if we can't add something like a pipe trick. --[[User:Tom|Tom]] 07:57, 5 March 2009 (UTC)
Added some, as this is a talk page we can just add and edit, I expect?-[[User:Chénier|Chénier]] 23:13, 4 February 2009 (UTC)
 
:Yes. I have removed all the "number" things, though. That is exactly what we do '''not''' want in a semantic web - stuff that has to be corrected manually all the time and could be calculated. --[[User:Tom|Tom]] 06:40, 5 February 2009 (UTC)
 
  
:I think there's some confusion here. Depends on what the answer to my other question is, though... But the way I see it, if you put <nowiki>[[capital of::Fengen]]</nowiki> on the <nowiki>[[Enweil]]</nowiki> page, the relation created will be: "Enweil" is the capital of "Fengen", which isn't the case. I'm not saying I necessarily got it right, though, but given the example with germany and berlin on their website, that seems to be what it is. As such, you'll want the property <nowiki>[[has ruler::bob]]</nowiki> instead of <nowiki>[[ruler of::bob]]</nowiki>, as the latter sates that your page is the ruler of Bob, instead of Bob being the ruler of the page. (Needs to resign, not closing <nowiki><nowiki></nowiki> erased it)
+
== Semantic Properties Generated by Templates From External Data Is Broken==
::Oh, that's what you said. I could have sworn it wasn't there a second ago. Well, good, seems like we both understand it the same way:) (Needs to resign, not closing <nowiki><nowiki></nowiki> erased it)
 
:::That's exactly what I said and why I want a little more expressive terms. When you use "has ruler" and "ruler of" instead of just "ruler", it becomes immediately obvious that "ruler of::bob" makes no sense. --[[User:Tom|Tom]] 06:40, 5 February 2009 (UTC)
 
  
 +
The value of semantic properties inserted by templates are set for a page when the page containing the template is saved.<br>
 +
Usually not a problem ''unless'' the template uses external data to choose the semantic properties to insert on the page, if the external data changes the semantic property values does not until the page containing the template is edited and saved again.<br>
 +
This means semantic properties set from, for example Template:RealmBox can be (and in some cases definately are) wrong.
 +
The fix is to run a cron job to update the semantic data, (an hour after turn changes would be perfect if the server can handle the load, no reason not to heavily 'nice' the process).
  
:Should be a term connecting a character to a family. Having trouble thinking of what though.--[[User:Athins|Athins]] 02:38, 5 February 2009 (UTC)
+
http://www.mediawiki.org/wiki/Extension:External_Data#Using_External_Data_with_Semantic_MediaWiki. -- [[User:Wraith0x29a|Wraith0x29a]] 22:23 5 November 2009 (UTC)
 
 
::"member of" should cover family relations. The cool thing is that you can also model actual relations using semantic terms, so "son of" and "father of" works great, as does "brother of". I'll add a category for that. --[[User:Tom|Tom]] 06:40, 5 February 2009 (UTC)
 
:Maybe a "was member of" for former realms.--[[User:Athins|Athins]] 18:41, 5 February 2009 (UTC)
 
 
 
== "Part of" as relates to Duchies, Region pages as subpages ==
 
  
We are going to run into two problems that I can see so far with links.
+
:Yes, this is a known issue. I've discussed the matter with Tom a few times. He does have a script which can refresh the semantic data. Server load is definitely the issue. Tom is very busy, and hasn't had a lot of time to look at things. From the checking he did get done, he didn't see any good ways to minimize the load from the script he was using. Still, I will pass along the link you have provided, and see if it can be of any use to him or any of the other devs. --[[User:Indirik|Indirik]] ([[User talk:Indirik|talk]]), [[BattleMaster Wiki:Editors|Editor]] ([[BattleMaster Wiki:User-Editors Talk|talk]]) 17:52, 7 December 2009 (UTC)
* Using <nowiki>[[Part of:: ]]</nowiki> for duchies. This creates a link to the city name as a root page. The problem being that the region page for the city is a subpage of the island. This also conflicts with conventions in the case where the region, duchy, and realm all have the same name. Perhaps we need another convention for duchies: <nowiki>[[Part of::Duchy of Perdan]]</nowiki>? This will link to the root page of [[Duchy of Perdan]].
 
* This brings up another point: Region pages are subpages of the island, so you can't really address them by the region name. This makes the listing of regions like this: {{#ask: [[Category:Regions]] [[Located on::Beluaterra]] | limit = 3}}. This isn't so much a problem as it is annoying. Helpful is you are, for some reason, compiling a list of regions across multiple islands, but I doubt that will be done much. I'm not sure if there's any way to get past this last one yet. I have a feeling there is none.
 
--[[User:Indirik|Indirik]] 15:09, 5 February 2009 (UTC)
 
  
: Yeah, all these are now legacy problems of the structure we had. We should probably have "Perdan" be a disambiguation page that links to the City, the Duchy and the Realm. Then the links in infoboxes could link to the correct entry (e.g. "Perdan (Realm)") while using the pipe trick to display only "Perdan".
+
::Any progress on this or should we add instructions on how to do this manually (edit, add space if no other edit required, save as minor edit.. starting with lowest level..eg. realm page, duchy page then region page for region data updates)? [[User:Wraith0x29a|wraith0x29a]]
: Region pages being subpages of islands is bad anyways. It helped, but it's not the way MediaWiki was intended to be. We should discuss whether we want to move them all. --[[User:Tom|Tom]] 22:31, 5 February 2009 (UTC)
 

Latest revision as of 05:06, 4 February 2011

Cleanup

It would be a good idea for people who post ideas to remove them or clean them up when they are moved to the front page, or we decide they are not appropriate. This page will rapidly get too cluttered with old idea to follow the current discussion. --Indirik 18:10, 5 February 2009 (UTC)

Special Characters in Character Names Breaks Things

Check the Lord's name here: Partora. It breaks the semantic coding. I tried dong a [[has lord::<nowiki>...</nowiki>]], but got an error. --Indirik 16:52, 25 March 2009 (UTC)

Yeah, that character desperately needs renaming. The name wouldn't even be possible anymore today. --Tom 18:34, 25 March 2009 (UTC)


Maps Service

Using Service Links we can easily add links to region detail pages and other backlinks into the game (family pages, etc.)

Various Ideas

"member of" should cover family relations. The cool thing is that you can also model actual relations using semantic terms, so "son of" and "father of" works great, as does "brother of". I'll add a category for that. --Tom 06:40, 5 February 2009 (UTC)
Maybe a "was member of" for former realms.--Athins 18:41, 5 February 2009 (UTC)
That's an interesting idea, but it would also require further annotations, specifically dates. Anyone know if there's a way to express things like "was a member of X from (date A) until (date B)" ?
I think this could be done using Many-valued properties. --Tom 13:42, 7 February 2009 (UTC)
Following that idea(which I like, but could see troubles with), I think we need a had ruler/judge/general/banker/capital etc. function for lost realms or for just former people in those offices. This could apply to lordships as well and begin to collect a database of claims when you view former council members, regions, lords etc. --Vita Family 15:06, 8 February 2009 (UTC)

Calculating realm population

OK, I'm calculating population, using this query:

{{#ask: [[part of::Keplerstan]] | ?population | format=sum }}

It works and gets the right answer, but with one problem: it wraps the answer in <p>...</p> tags, like this:

The population of Keplerstan is {{#ask: [[part of::Keplerstan]] | ?population | format = sum }} commoners.

The population of Keplerstan is 999 commoners.

This only seems to affect the "sum" format. The "list" format doesn't do this:

The population of Keplerstan is 999 commoners.

Anyone have any ideas? This is *really* annoying. --Indirik 23:41, 25 February 2009 (UTC)

Looks like being a "feature" of the sum format. --Tom 07:32, 26 February 2009 (UTC)
Testing if this is also for the other math functions:
The max population in Keplerstan is 999 commoners.
The min population in Keplerstan is 999 commoners.
The avg population in Keplerstan is 999 commoners.


Region properties

The New Economy appears to assign two major resource types to each region. How about assigning semantic properties for these? That would allow us to easily create a list of all regions that have, for example, stoneworks, or mining. Perhaps: [[has resource:: ... ]]? Maybe we could then even dynamically list the resource types produced by a realm... --Indirik 20:40, 20 March 2009 (UTC)

It's not that simple, but I agree in principle. The thing is that this is not a list of available resources, it expresses something different. Let's wait with that until the system is done. --Tom 18:36, 25 March 2009 (UTC)

Template:Pie

I've not done much research into this Semantic wiki stuff, but would adding a Semantic query to Template:Pie (referenced by New Attributes) be appropriate/possible? Something like {{#show: {{PAGENAME}} | ?attributes}} (which, when rendered, would be {{#show: [[November_Family/Calvin]] | ?attributes}} for this character)? --Calvin November t/c on 06:55, 21 February 2009 (UTC)

Not worth the effort right now, because it's not certain the new attributes are ever going to go active. --Tom 12:07, 21 February 2009 (UTC)

Articles and News

Should we also put semantics on articles and news? We could use something like "about" or "news date" and it would allow us to do searches on articles across the various newspapers, generate timelines and other interesting stuff. --Tom 21:38, 4 March 2009 (UTC)

That is an interesting idea. An "about/topic/keyword" attribute could be very nice. As to date, is that really a viable option? As far as I know, the timeline only points to the page name on which the property is placed. This means that the date would point to, in the case of the Dwilight Daily, something like "Dwilight Daily/2009/January", and that would be what appears on the timeline. Or can you somehow give a date property a secondary value with an article name? Or do we need to rethink the way newspapers are done? TO be honest, I haven't had a lot of time to investigate timelines. --Indirik 22:35, 4 March 2009 (UTC)
Yes, we would probably have to do that. [1] shows how this works, and it does have one page per news. Unfortunately, multi-valued properties can not be used in timelines. But if nothing else works, we can look into the code and check if we can't add something like a pipe trick. --Tom 07:57, 5 March 2009 (UTC)

Semantic Properties Generated by Templates From External Data Is Broken

The value of semantic properties inserted by templates are set for a page when the page containing the template is saved.
Usually not a problem unless the template uses external data to choose the semantic properties to insert on the page, if the external data changes the semantic property values does not until the page containing the template is edited and saved again.
This means semantic properties set from, for example Template:RealmBox can be (and in some cases definately are) wrong. The fix is to run a cron job to update the semantic data, (an hour after turn changes would be perfect if the server can handle the load, no reason not to heavily 'nice' the process).

http://www.mediawiki.org/wiki/Extension:External_Data#Using_External_Data_with_Semantic_MediaWiki. -- Wraith0x29a 22:23 5 November 2009 (UTC)

Yes, this is a known issue. I've discussed the matter with Tom a few times. He does have a script which can refresh the semantic data. Server load is definitely the issue. Tom is very busy, and hasn't had a lot of time to look at things. From the checking he did get done, he didn't see any good ways to minimize the load from the script he was using. Still, I will pass along the link you have provided, and see if it can be of any use to him or any of the other devs. --Indirik (talk), Editor (talk) 17:52, 7 December 2009 (UTC)
Any progress on this or should we add instructions on how to do this manually (edit, add space if no other edit required, save as minor edit.. starting with lowest level..eg. realm page, duchy page then region page for region data updates)? wraith0x29a