Lukasz Bolikowski wrote:

 > I attach a Polish translation of the SMW messages.
Thanks!  I checked it in.

(My understanding is that swikig is for general topics in Semantic Wikis 
to "bring researches from Semantic Web, Wiki and Knowledge Acquisition 
community together".  For discussion specific to the Semantic MediaWiki 
extension, consider the SMW mailing lists semediawiki-user or 
semediawiki-devel, see http://sourceforge.net/mail/?group_id=147937
)

> By the way, I've got some small feature requests.

If nobody responds definitively, you can enter bugs for your 
enhancements referencing your e-mail so they don't get lost.  Here's a 
vague response :-)


> First, could you support *both* English and local names of namespaces
> and built-in types?  In MediaWiki, links such as "Category:XYZ" or
> "Image:ABC" are understood in non-English language versions as well.
> Could you do the same for "Type:XYZ", "Attribute:XYZ", "Relation:XYZ",
> respective discussion namespaces, special pages and built-in types?
> Here is an example of such "redirection" in MediaWiki (both for NS
> and page title):
>   http://pl.wikipedia.org/wiki/Special:Version

Special:Version works on a Polish site because
a) MediaWiki hardcodes the canonical names for built-in namespaces like 
"Specjalna".
b) Special pages provide their canonical name which is localized to 
"Wersja".

a) I believe you can say [{Category:Aktorki]] as well as 
[[Kategoria:Aktorki]] in a semantic query in Polish.  I think the fix to 
make the additional SMW namespaces work as well is to add SMW's 
canonical names to $wgNamespaceAliases.  I entered a low-priority bug 
9296 for this,
http://bugzilla.wikimedia.org/show_bug.cgi?id=9296

b) I'm not sure how to make pages for built-in types work with canonical 
names as well as the translated names.  AFAICT, there's no notion of 
"built-in article" for MediaWiki outside Special:.  You might be able to 
fake it by creating #REDIRECT pages from the English type names to the 
Polish type names.

I'm curious how fixing one or both of a) and b) would help you.  Are you 
hoping to make it easier to copy and paste English "setup" pages like 
[[Attribute:Mass] with its [[has type::Type:Mass]], or are you hoping to 
copy and paste general English articles and get a bit of semantics from 
them?  If so, maybe it would be better to provide some kind of "machine 
translation" of English facts into Polish, using MediaWiki's 
interlanguage links (e.g. [[pl:Typ:Liczba zmiennoprzecinkowa ]]) on each 
page.  If you hope to do something else altogether, please say.


> Second, suppose I have an integer attribute named "possible state",
> and an article X with [[possible state:=1]] [[possible state:=8]].
> I want to create a query that would select those articles which
> have "possible state" in the range 4-6, inclusive.  Therefore,
> I don't want X to appear in the results.  This query:
>   [[Category:Thing]]
>   [[possible state:=*]]
>   [[possible state:=>4]]
>   [[possible state:=<6]]
> will not work.  Wouldn't it be better to modify the query semantics
> so that the above query would not select article X?

Wow, that's an interesting glitch.
The page with *two* [[possible states]] meets the two criteria, the 
question is whether the constraints should apply individually to each 
attribute value or to the set of attributes on the page.  Maybe SMW 
queries should have an "in range" operator that explicitly does what you 
want.

Here's the SQL query for something similar on my system:

1 SELECT t0.page_id,t0.page_title,t0.page_namespace
2 FROM `page` AS t0,`smw_attributes` AS t1,`smw_attributes` AS t2
3 WHERE t0.page_id=t1.subject_id
4  AND t1.attribute_title='Possible_state' AND ((t1.value_num>=4
5  AND t1.value_unit=''))
6  AND t0.page_id=t2.subject_id
7  AND t2.attribute_title='Possible_state' AND ((t2.value_num<=6
8  AND t2.value_unit=''))
9  AND ((t0.page_namespace=0) OR (t0.page_namespace=6))

I think what happens is InlineQuery makes a second query of the 
smw_attributes table in lines 6-8 for the second constraint.  If instead 
it applied both constraints at once in line 4:
  AND t1.attribute_title='Possible_state' AND ((t1.value_num>=4 AND 
t1.value_num <=6
then you'd only get one match.  Hmmmm.


Regards,
--
=S Page

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

Reply via email to