Re: [SMW-devel] postgres Support

2009-01-11 Thread S Page
Dominik Dejmek wrote:

> Do you know where I can find some information of the existing postgresql 
> and mysql support of mediawiki, which you used in the code of smw?

http://www.mediawiki.org/wiki/MediaWiki_on_PostgreSQL doesn't have much 
of use, and its Talk: page is somewhat disheartening.

You use ($wgDBtype == 'postgres')  to check , 
http://www.mediawiki.org/wiki/$wgDBtype

<http://svn.wikimedia.org/svnroot/mediawiki/tags/REL1_13_3/phase3/includes/db/DatabasePostgres.php>
but there are some global variables and such set up elsewhere.

Good luck!
--
=S Page

--
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] How to get the raw page name from an inline query result

2008-12-09 Thread S Page
Alex Le Bek wrote:

> I have inline query results formatted for display through a template. I 
> would like to pick up the {{{1}}} page parameter value - not for the 
> purpose of linking to the page ...
> However the query result returns {{{1}}} as a prebuilt link - is there a 
> way to unpackage this so as I can just have the page name?

That confused me too.  Add the parameter | link=none | to your queries 
to disable the "prebuilt link".  Then you'll just get the page name.

You'll probably also need to set link=none when you're using a template 
to shorten link text, control image display, use one property value as 
the alt text for another, etc.

If you use link=none you'll then have to add your own [[ ]] around any 
page property column in results that you want to be a link.

See 
<http://semantic-mediawiki.org/wiki/Help:Inline_queries#Standard_parameters_for_inline_queries>
I added a suggestion to use |link=none| to the "Using templates for 
custom formatting" section of this page.

Cheers,
--
=S Page



--
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] Appearance of Query Result -- External Links with text label

2008-11-29 Thread S Page
A while back, Clemente, Bernadette E. wrote:
> I’d like to display a text label with its associated external link as a 
> property in the result of an #ask query. For example, I’d like to see 
> _Bernadette_ instead of  http://info.ldapserver.org 
> /whatever/Bernadette.  I used the Tablerow and Homepage templates on the 
> http://semanticweb.org/ site and was successful in duplicating the 
> contact boxes but was not able to see the same information as part of an 
> #ask. What am I missing?

(It seems no one replied...)

You have very little control over property display in query results (so 
vote early and often for 
https://bugzilla.wikimedia.org/show_bug.cgi?id=15541 ).  So you'll 
probably have to use
   format=template | template=My-special-display
in your query results, and make Template:My-special-display that adjusts 
the appearance of the various values it's passed.  See 
<http://semantic-mediawiki.org/wiki/Help:Inline_queries#Using_templates_for_custom_formatting>

(The sad strange thing is this template you use to present query results 
nicely will probably not be able to share anything with the template you 
use to display the property values nicely while setting them.)

So, if you're storing the property as "Bernadette" and it's the third 
"column" passed to template=Person-display-tabular , you would do 
something like
   [http://info.ldapserver.org/whatever/{{{3}}} {{{3}}}]

If you're storing the property as 
http://info.ldapserver.org/whatever/Bernadette , then you can use string 
parser functions to trim down what is displayed, like
   [{{{3}}} {{#replace:{{{3}}}|http://info.ldapserver.org/whatever/ |}}]

If you're trying to fiddle with pages and URLs, you should probably pass 
the option |link=none to #ask , otherwise, pages and URLs will already 
have been wrapped in square brackets by SMW.

If there might be more than one value of the property, you'll probably 
end up needing the #arraymap parser function from the Semantic Forms 
extension so you can control the display of each value.

http://wiki.laptop.org/go/Releases-test#Templated_query shows an example 
of a query results template.


If you want the query to display the information *exactly* as it's 
rendered in the original page, you may be able to use format=embed, 
which just embeds the pages matching the criteria.

>  Also, we would really like to display the 
> results of the parser extension ldapinfo 
> <http://www.sourcecodeonline.com/details/mediawiki_extension__ldap_info.html> 
> as a property….We are using MediaWiki 1.13.2 and Semantic Mediawiki 1.3.

Sorry, I'm not familiar with that extension.
Cheers,
--
=S Page

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] Inline Query Question

2008-11-01 Thread S Page
[EMAIL PROTECTED] wrote:

> On an inline query, is it possible to create a condition that if a 
> number (say a program was running from 1 - 13) and answers are returned 
> for say all but 11, to instead replace 11 with a bar

Let me rephrase that.  Your query returns a RaceNo number property which 
you sort on.  It happens that in your results table this number will 
usually go  1, 2, 3, 4, ... and you want to display a bar when there's a 
discontinuity in this number between two rows.

A SMW query selects a set of pages matching a criteria and returns their 
properties, so this analysis of the results affecting the display is 
outside what the SMW code does.  You could try to hack the SMW query PHP 
code to add "check for discontinuity" and somehow specify the columns 
you want to check, but it doesn't seem easy.

> So, in the query template, can I make it so that if say n1 is not equal 
> to n0 + 1, then to insert the bar?

Maybe.  Use format=template so that your template is called to print 
each row of the table.  In your template do the discontinuity check 
(using Extension:ParserFunctions' #ifexpr: ) against a variable 
previousRaceNum and if so display your bar, then update previousRaceNum. 
  MediaWiki doesn't let you set variables, but it sounds like 
http://www.mediawiki.org/wiki/Extension:VariablesExtension lets you do 
{{#vardefine: previousRaceNum | {{{1}}} }} .  I've not used it.

Denny sent e-mail about "New functions: Set and Declare" in September, 
you might be able to use these features to set your previousRaceNum but 
that doesn't seem like their intent.

--
=S Page

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] two small extensions

2008-09-22 Thread S Page
Andreas Wombacher wrote:
> I made two small extensions:

Well done!

To tell the world,
* Create a page for it in the Extension: namespace on www.mediawiki.org
* Maybe add it to http://www.mediawiki.org/wiki/Extension_Matrix (that 
list may/may not be updated automatically)
* If it requires SMW, add it to the list under
http://www.mediawiki.org/wiki/Semantic_MediaWiki#Spinoff_extensions

If mediawiki.org used SMW these lists would happen automatically ;-)

--
=S

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] Trouble with a simple query special page

2008-09-20 Thread S Page
Kai Hüner wrote:

> I just want to create a special page that returns a CSV file: A list
> of all instances of a category, some of their property values and some
> static values.

I assume you know you could just put something like:
{{#ask: [[Category:Person]]
   |?Foaf:mbox
   |?Affiliation
   |format=csv
}}

?  It displays a _CSV_ link to Special:Ask that returns a CSV file?

I don't think the details of Special:Ask's URL's parsing are documented, 
but you can figure out what it does then fabricate links that make it do 
do what you want.

I guess your issue is the "static values" part.  format=csv doesn't take 
format=template, so it's not obvious to me how to stick extra stuff in 
without PHP coding.

Good luck with the code, it is indeed rich and complex these days.

--
=S

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] unicode error

2008-09-18 Thread S Page
Robert Murphy wrote:
> I discovered that since I'd updated a template concerned 
> solely with my Greek language pages, is generating an error on every update:
> 
> 2008-09-18 12:16:05  494100  refreshLinks Greek:ΑΙΩΝ
> PHP Warning:  preg_split(): Compilation failed: nothing to repeat at 
> offset 8 in 
> ... extensions/SemanticMediaWiki/includes/SMW_QueryProcessor.php 
> on line 754
> 
> Every single update is generating this error!  Any ideas as to why regex 
> is freaking out over unicode?

Many characters in Unicode are made of multiple bytes, and when PHP 
comes along and processes a string byte-by-byte, part of your Greek 
symbol might look like a pattern code like / or NON-BREAKING SPACE or 
something.

This sounds like https://bugzilla.wikimedia.org/show_bug.cgi?id=13321
How old a version of SMW are you running?  Markus marked this fixed in 
March 2008.

Try modifying that line 754 in SMW_QueryProcessor.php to add 'u' on the 
end of the preg_split, which tells PHP "don't scan byte-by-byte, look 
Unicode character-by-character" , see 
. 
I'm not sure what version you have, but e.g. if the line is
$list = preg_split('/^\*/',$value,2);
change it to
$list = preg_split('/^\*/u',$value,2);

PLEASE let semediawiki-devel list know if that fixes it.  To my clueless 
eye, all regular expressions in the file that might tickle the problem 
have the /u modifier.

--
=S

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


[SMW-devel] I messed up SMW in Subversion with Rev. 40976

2008-09-18 Thread S Page
Just shoot me now.


I tried to upgrade my local install to SMW 1.2 (the version that 
wiki.laptop.org is running).

First I tried specifying REL1_2, but that's a mediawiki branch not a SMW 
branch.
When I specified a specific revision number 37479, the Subclipse plugin 
for Eclipse started *committing* files!

I cancelled immediately, but inside 
http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/SemanticMediaWiki/ 
, Subclipse seems to have created a directory "REL1_2" containing the 
phase3 MediaWiki code :-(

   REL1_2/   Revision 40976  Age 111 seconds Author 
skierpage

I think all that's needed is to delete
http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/SemanticMediaWiki/REL1_2/

Subclipse provides a command "Revert changes from revision 40976", but 
after that fiasco I don't trust the plug-in at all.

I'll switch my SVN access to anonymous read-only.

Apologies.
--
=S Page


Here's the log

copy -r37479 
svn+ssh://[EMAIL PROTECTED]/svnroot/mediawiki/branches/REL1_2 
svn+ssh://[EMAIL PROTECTED]/svnroot/mediawiki/trunk/extensions/SemanticMediaWiki
 Committed revision 40976.
switch 
svn+ssh://[EMAIL 
PROTECTED]/svnroot/mediawiki/trunk/extensions/SemanticMediaWiki/REL1_2 
C:/xampplite/htdocs/mediawiki/extensions/SemanticMediaWiki -rHEAD
 D  C:/xampplite/htdocs/mediawiki/extensions/SemanticMediaWiki/INSTALL
 D  C:/xampplite/htdocs/mediawiki/extensions/SemanticMediaWiki/languages
 D  C:/xampplite/htdocs/mediawiki/extensions/SemanticMediaWiki/libs
 D  C:/xampplite/htdocs/mediawiki/extensions/SemanticMediaWiki/README
 D 
C:/xampplite/htdocs/mediawiki/extensions/SemanticMediaWiki/RELEASE-NOTES
 D  C:/xampplite/htdocs/mediawiki/extensions/SemanticMediaWiki/skins
 svn: operation cancelled

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


[SMW-devel] special [[Property:Has format]] (was Re: [News] Plans for SMW 1.4)

2008-09-09 Thread S Page
Markus Krötzsch wrote:
> If you still feel that some relevant feature request to the SMW
> *core* is not mentioned here at all (I may have forgotten it), then
> please feel free to say so.

I want to be able to specify the appearance of values using a new 
special [[Property:Has format]].  Here are some wishes and use cases:

* I want numeric IDs to appear without commas!  "Build 4,231" or "Bug 
12,345" isn't right.

* I should be able to make something appear as a link everywhere, e.g..
** I want a bug to appear as 
[http://bugzilla.wikimedia.org/show_bug.cgi?id=14426 bug 14426] everywhere.
** I want coordinates to appear as a link to Google Maps everywhere.

* I should be able to "reach in" and adjust the appearance of a 
Type:Page link, e.g. specify |55px for an Image.

* Bring back the date formatting that was in SMW 0.7 (bug 11853)

* Type:Code seems like overkill just to tell MediaWiki to display 
something in  tag.

Currently there are three different ways that you control the appearance 
of values:
* In the original annotation you use alt text, possibly using a template,
* In the factbox and "Pages using the property foo" list you have no 
control! but you can tack on service links
* In inline queries you can use format=template but it's implemented 
differently than service links.

I think a lot of this can be handled by a special property [[Has 
format::]].  You give it a complicated formatting string.  Maybe you 
have to indicate whether the result is HTML or wiki text.  SMW makes 
available to your formatting string all the different values it already 
computes for its datatypes (value, xsd, shortwiki text, etc.), possibly 
similar to the way service links are passed different values.

You would still be able to override the format in queries by specifying 
a different format using the ?Name#Some_format, just as you can 
currently specify the units for a column.

If service links are going to die, then maybe their idea can be 
preserved by supercharging [[Has format]] to let you specify the entire 
"look" for a value, including
* the visible display, including the formatting of numbers and dates
* the hyperlink for the value
* the contents of the hover pop-up (like the one you get over a quantity 
with several units)
* the contents of the service links "(?)" pop-up.

That's a lot of work but it could lead to code simplification because 
instead of all the hardcoding of showing unit conversions and 
coordinates in brown and making special wiki links for Type:email, these 
would be driven by a default Has_format for each datatype, that user 
code could override.

>  I did not see any other major requests in Bugzilla.

I filed enhancement bug 15541 with all the above long-winded text.

BTW, this isn't just armchair theorizing.  To the wiki editors on 
wiki.laptop.org it seems if they start using semantic annotations, they 
"lose" MediaWiki's easy ability to say
   [[the page|exactly what I want to display]]
-- suddenly bug numbers appear with commas and without links, images 
appear with random sizes, etc.  I explain how SMW is re-displaying the 
underlying data values, but to them it isn't "doing what I want" ;-)

Thanks for listening!

--
=S Page

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] AnyDateTime library

2008-09-03 Thread S Page
Daniel Friesen wrote:
> I'm working on a DateTime library, AnyDateTime 
> <http://svn.nadir-point.com/viewvc/php-projects/trunk/AnyDateTime/>. The 
> plan is to have a library that can cover nearly any possible time or 
> date in history. The AnyDateTime library has a storage format which uses 
> 22 characters, and sorts correctly in the database.

Interesting!  Are you going to convert between different calendars?  IMO 
it's a complete waste, ISO8601 is the one true format.  But everyone 
implements the edge cases like years >  and year "0" differently, 
see notes at http://www.w3.org/TR/xmlschema-2/#dateTime

> 0501?? would be understood as May 1st. 
Or are you going to make people enter dates in your nifty format? You 
could make it somewhat user-friendly just by putting the same dividers 
that ISO8601 uses, thus
   -05-01T??:??:??
It only adds 5 characters...

> The range of possible dates this library can cover is from
> 99,999,999,999 00:00:00 B.C.E. to 999,999,999,999 23:59:59 C.E.

Another way to handle dates far back in the past is to use Mya (million 
years ago, which is just a conversion for the custom unit Type:Time. 
See e.g. http://sandbox.semantic-mediawiki.org/wiki/Property:Geologic_time

I assume you're not bothering with timezone support and I wonder if it 
can work with Simile:Timeline.

You could still claim your datatype isNumeric, converting to a slightly 
inaccurate float just for SMW's collation.  On the other hand, if you 
stick with string, SMW's "LIKE" comparator for strings would let you 
query for
   [[event::~0501*]]
to find "everything happening on May 1st" whether it's got a year and 
time or not.

> Hmm, rather than an overcomplicated output setup, I'm probably going
> to create a small format for outputting. One that works with Gregorian
> and Julian bases. Otherwise I'll overload with possible formats of outputs.

A while back you could control Type:Date in query results and with 
[[Property:display_units]] to specify a "custom unit" that was really a 
strftime() formatting string, thus
   |?Date of birth#%b %d=Birthday
in a query would display "Sep 3".  It was cool, it's broken now, but I 
incoherently think an explicit Property:Has_display_format that each 
datatype interprets is the way to go.

How will you export as RDF?  A while back a datatype could not export as 
xsd:dateTime in some situations and then as xsd:string in others.

> Quite simply, the idea is to be able to make use of it in Semantic 
> MediaWiki as an alternative date format. That way it's available for 
> anyone covering historical dates and such.

Denny wrote:
> There's also a student of ours working on something close to it,
> although I am not totally informed about the status. Since I don't know
> if Fabian is on this list, I'll CC him.

I think it would still be useful for someone to extend Type:Date to 
support dates beyond the range of the PHP timestamp (and support 
timezone, and use the user's Date & time format preference, ...).  I 
think the thing to do in Date:Time is detect when you're at the edge of 
the range and then do some simple timestamp= ( + (12 * (MM + 31 * 
(DD + 24 * (HH + 60 * (MM + 60 * SS) to turn it into a large number. 
Again, only bother doing this for ISO8601 dates.

Good luck y'all, and despise me because I know more details than I can 
code.  Damn armchair commenters :-)

"Tonight I'm going to party like it's 1999-12-31T23:59:59 !" -- The 
Artist Formerly Known as Prince.
--
=S Page

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


[SMW-devel] sorting pages with multiple values for a property

2008-06-30 Thread S Page
If a page gives multiple values for a property, which one wins when you 
sort on that property?

In my local tests on SMW 1.1.2. I can't see any pattern to it.  On 
http://sandbox.semantic-mediawiki.org/wiki/Test_sorting (version 
1.2f-SVN) it seems to sort using the "first" value on the page for the 
property.  That page sorts by Author and many papers put each author 
annotation alphabetically.  But this paper appears in the 'B's despite 
having some 'A' authors:

Using and Combining RDF Vocabularies for Expert Finding
Boanerges Aleman-Meza
Lyndon JB Nixon
Axel Polleres   <--- !!
John G. Breslin
Harold Boley
Anna V. Zhdanova<--- !!
Malgorzata Mochol
Uldis Bojars

If I sort descending, again SMW seems to sort on the first value it 
finds for the property.

==> Is this a bug?  You could define a sort order, e.g. if ascending 
sort based on the lowest value of the property's values on the page.

A while ago Markus told me the order of property values for a page 
retrieved from the database was indeterminate, so values might not be 
returned in page order, so there's no "first" property value on a page.


==> Should 
http://semantic-mediawiki.org/wiki/Help:Semantic_search#Sorting_results 
just say "If pages have multiple values for the property, their sort 
order is undefined." ?  Or I could just not say anything ;-)

Thanks for any insight!
--
=S Page

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] SMW inverse properties

2008-06-08 Thread S Page
Jeff Thompson wrote:

> At the beginning of SMW development, the idea was that, to make everyone
> happy, anyone could create any property that they want and give it whatever
> meaning they want in their wiki.  That's great for making everyone feel
> included (even the wiki users who just want to jump in without thinking
> about what they are doing).
> 
> But as soon as SMW has to do inference, even the basic inference for
> transitive and inverse properties, then this requires not only a
> syntax, but also a semantics.  Some people don't like (or don't understand)
> the semantics developed for OWL, but at least it is well-defined.
> 
> Does SMW use the semantics defined for RDF/OWL by default?

SMW is "just" PHP code that parses wiki annotations and makes DB 
queries.  It implements some useful semantics, e.g.:
* querying for category membership also finds members of subcategories,
* querying for a property finds also finds pages with its subproperties
* querying for a page also finds #REDIRECT pages.
but not (currently) others (transitive properties, identical properties, 
etc.).  So there's no "default" semantics, just code, though I'm sure 
the main developers were guided by ideas in RDF/OWL.

Special:ExportRDF does use RDF, RDFS, OWL, and XSD semantics to 
represent the annotations in SMW; export some pages and see!  As you 
note, many SMW sites don't care about this.  As we've discussed on the 
mailing lists, other sites do care about the semantics that RDF Export 
"promises", especially when it comes to MediaWiki categories.

>   If a wiki
> user wants a different semantics (for what defines equivalent topics, etc.)
(Equivalent topics isn't a good example because its sort-of covered by 
making one page a #REDIRECT to another, or to link to an external 
concept see <http://semantic-mediawiki.org/wiki/Property:Equivalent_URI>.)

> does SMW support a language for them to define it (pretty difficult)?

FYI, to me SMW 1.1's "language of semantics" is, roughly:
* MediaWiki's articles, categories, and #REDIRECT
* SMW's property annotations
* and SMW's 8 special properties 
<http://semantic-mediawiki.org/wiki/Help:Properties_and_types#Special_properties>
 


That's insufficient to define semantics for things like transitive, 
inverse, broader, etc.  You're free to add additional properties and 
categories to your wiki representing any semantics, but they won't mean 
anything to SMW, and it's up to you to make your queries respecting 
them.  You can see lots of experiments along these lines on the sandbox 
site, e.g. check out 
http://sandbox.semantic-mediawiki.org/wiki/Category:Transitive_relation


One thing you can do is use 
http://semantic-mediawiki.org/wiki/Help:Import_vocabulary to associate 
terms in your wiki with an external ontology.  Then RDF export will use 
that ontology in place of .  The classic example of 
this is importing FOAF so Property:Name can export as
   http://xmlns.com/foaf/0.1/"; >
   
which means something to Sir Tim's "Semantic web";
instead of
   http://semanticweb.org/id/Property-3A'>
   
which doesn't mean anything outside your wiki.

At one point I wanted to take all the properties that people invented in 
experiments with ontologies on the old ontoworld.org site and say 
[[Imported from::owl:inverseOf]], [[Imported from::skos:narrower]], etc. 
  But as Markus wisely pointed out, doing this would suggest that SMW 
supports these features.

> You see where I'm going with this question.  Doesn't SMW need to get
> past the "anything goes" and officially commit to some well-developed 
> semantics
> such as OWL?

What's wrong with what I've described above?  What would you like to see 
instead?  I imagine that as SMW does support additional features of 
ontologies, each will effectively have certain semantics in its PHP 
implementation and promise certain semantics in RDF export, just as say 
<http://semantic-mediawiki.org/wiki/Property:Subproperty_of> does now.

I hope this simplistic overview helps.  BIG DISCLAIMER: I haven't 
inspected the new features in SMW 1.2, nor have I used SMW with 
SMW_RAPStore (RDF API for PHP) instead of the default SMW_SQLStore.

As ever, I'd love to hear of people's experiences using SMW with 
external ontologies.

Some of these topics are touched on by 
http://semanticweb.org/wiki/Help:Suggestions , which people can edit.

Regards,
--
=S Page

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] RDFa support for SMW

2008-06-06 Thread S Page
Sergey Chernyshev wrote:

> I'm thinking about different forms of RDF publishing that is being 
> adopted by various data consumers and RDFa (and possible eRDF) seem to 
> be quite interesting - Yahoo hopes to support it in SearchMonkey 
> eventually and RDFa usecases at W3 even mention it in connection with 
> SMW: http://www.w3.org/TR/2007/WD-xhtml-rdfa-scenarios-20070330/#use-case-6
> 
> The question to Markus and Denny, are there any plans for this?

Heh, I brought that up years ago when I first heard of RDF/a (below).  I 
think I filed an enhancement bug but I can't find it now.

However, I wonder how useful RDFa in SMW is.  Every SMW page explicitly 
identifies that its facts are available as rdf+xml in the official 
standard manner:

   


So is it only tools that ignore this and just look for RDFa in HTML that 
benefit?  Are there lots of such tools?  The bookmarklet I mention below 
(hah, it's been in my browser toolbar for over two years and I haven't 
used it for 18 months) would highlight any RDFa statements in HTML. 
That might be useful but a) SMW shows all its statements in the factbox, 
and b) many SMW pages hide their statements (with the "| " alternate text).

I'm not arguing against it, just wondering.

--
=S Page


= = = = = = = early message = = = = = = =

Subject: Re: [Semediawiki-user] Do (could) types show up in the HTML?
Date: Sun, 26 Mar 2006 22:51:12 -0800
To: [EMAIL PROTECTED]
References: <[EMAIL PROTECTED]>

Summary: consider RDF/A for this.

Rich Morin <[EMAIL PROTECTED]> wrote a while ago:

> I've looked at the source code for the page
> http://wiki.ontoworld.org/index.php/Help:Relation,
> looking for any encoding of the type information in
> the generated links.  I haven't found any, but I may
> not be looking in the right places, way, etc.
> 
> In any case, I would like to promote the idea of
> making this information "visible" to web browsers,
> web crawlers, etc.

Denny Vrandecic <[EMAIL PROTECTED]> responded:

> Nice idea. Is there already a syntax for that, like
>   shown text

Yes.  I think RDF/A , "syntax for expressing RDF metadata within XHTML",
is designed to do this.  You use the rel= attribute of  with a
value from a particular vocabulary's namespace.  The cool thing about
RDF/A is it also provides a way to denote property values using .

To misquote the fine http://wiki.ontoworld.org/index.php/San_Diego page,
   It is the county seat of San Diego County,
   with a population of 1,223,400.

I'm guessing its XHTML with type information encoded in RDF/A would be
   http://smw.ontoware.org/2005/smw";
   >
   ...
   It is the county seat of
   San Diego County,
   with a population of
   1,223,400.

One of the people on the "RDF in XHTML Taskforce" has a basic
bookmarklet to highlight RDF/A triples in HTML documents,
http://lists.w3.org/Archives/Public/public-rdf-in-xhtml-tf/2006Mar/0010.html

It would seem pretty feasible to add the  tag in the
SMWParseAttributesCallback() hook.  Adding the rel= attribute to
relation hyperlinks is harder as SMW currently relies on MediaWiki's
default [[wiki link]] processing after it's parsed the relations.

The RDF/A primer
http://www.w3.org/TR/2006/WD-xhtml-rdfa-primer-20060310/ is pretty
approachable compared with other W3 documents (until it gets into URIs
and CURIEs :-).


Regards,
--
=S

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] Cannot disable further results link

2008-06-06 Thread S Page
CNIT wrote:
> After upgrading to 1.12 I've found that problem with format=embedded 
> and further results link didn't disappear (no wonder).
> So, I've looked through the code and found a simple fix. It seems that 
> searchlabel was applied not checking it's empty value,
> which _should_ means that further results link will be suppressed.
> This behaviour contradicts with older SMW versions. Also, format=list 
> has such check.

I reproduced 
<http://sandbox.semantic-mediawiki.org/wiki/SMW_unit_test:Test_inline_query_embedding>,
 
and filed bug 14330.  Your fix looks right and matches 
SMW_QP_{List,Table,Template}.php.
Thanks for the report, you could have created the test case and filed a 
bug yourself.

> When I set searchlabel=Label1, it displays link with title Label1 twice -
> once as a last row of embedded list, second time as a proper searchlabel 
> link.

I couldn't reproduce that problem on SMW 1.2 pre-releases.  I just get 
searchlabel once as the last row of the embedded list.

--
=S Page

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


[SMW-devel] questions about Using templates, in inline queries help

2008-06-02 Thread S Page
I brought 
http://semantic-mediawiki.org/wiki/Help:Inline_queries#Using_templates 
into SMW 1.0: I made the examples work, used {{#ask}}, etc.

The notes used to say:

> * When output is limited, the template format will not be carried
> forward to the continuation link.
This seems fixed!

> * Parser functions applied to parameters (e.g. for computations and
> branching) do not work.
I don't understand this and I don't know if it's still broken.  Does it 
refer to using parser functions within the format template?  If it 
works, I'd love to have a simple example of this.

> * ... If the selected
> page itself is normally not produced, {{{1}}} refers to the first
> result about the page. Thus typically different format templates are
> needed for both cases. To avoid that, when enumerating pages in the
> query (or specifying a particular one), use parameter "mainlabel" in
> the query to assign {{{1}}} to the selected page, so that {{{2}}}
> etc. refer to the same results as when pages are not enumerated in
> the query.

This doesn't work.  Using mainlabel=someheader does not force the page 
titles to appear in the first column.  Rather, I have to use |? to make 
the unnamed column (i.e. the page title) appear.

--
=S Page

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] [PATCH] SMW rejects .info as email address

2008-04-30 Thread S Page
Asheesh Laroia wrote:
> Right now, includes/SMW_DV_URI.php has, in its regex for case 
> SMW_URI_MODE_EMAIL , a check that only allows domains of length between 
> 2 and 3 (inclusive).
> 
> This breaks .info addresses.
> 
> I am attaching (to avoid MUA/mailing list mangling) a simple patch that 
> extends this to accept domains of length between 2 and 4 (inclusive).

Thanks, I filed https://bugzilla.wikimedia.org/show_bug.cgi?id=13884 and 
a test case on your behalf and I think Markus fixed it in Subversion. 
The bug talks about upcoming .museum and .travel top-level domains.

You can get a bugzilla.wikimedia account to file your own bugs; you 
should still mention them on one of the semediawiki- mailing lists.

--
=S Page

-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] Creating a real Enumeration

2008-04-15 Thread S Page
DanTMan wrote:
> I was thinking of creating an actual enumeration type.

Heh, there used to be one in SMW 0.7, SMW_DT_Enum.

> Currently enumerations are done with a String type alias, and just using 
> [[Allows value::...]].

Actually they work for any type, though there's still bug 11820 with 
Type:Page.

> However, afaik there is no way to add aliases (Inf to Infinite, etc...), 
> and it also doesn't support recognizing similar things (like when 
> someone inputs male instead of Male, just with different case).
> So I was thinking of either making an actual Enumeration, or perhaps 
> creating an InsensitveString type, and also extending Allows value or 
> adding in another builtin to support aliases.

Maybe, I would force consistency.  Anyone motivated enough to add 
semantics to a wiki page will gladly get the value right, especially 
when inconsistency results in such excellent feedback:
   “Inf” is not in the list of possible values (1, 42, Infinite) for 
this property.

The problem with case-insensitive aliases is you now have to do 
case-insensitive queries to do what the user intended, or lowercase 
values as you store them.  It gets messy quickly.

See bug 9750, https://bugzilla.wikimedia.org/show_bug.cgi?id=9750 for 
ideas on more sophisticated ordered enumeration.  I and others wanted an 
optional syntax
   [[allows value::Infinite=]], [[allows value::Inf=]]
that would order values, but ran aground on implementation details of 
special properties.
Your Type:InsensitiveString is equally reasonable.  I *think* that just 
subclassing getHash() to lowercase would make case insensitive [[allows 
value]] work, but you'd still have to address querying.

If you use Type:Number together with "pseudo-numbers" like
   [[Allows value::2 - Medium]] [[Allows value::2 - Middling]]
   [[Allows value:: - Inf]] [[Allows value:: - Infinite]]

then you gain some of the normalization of numbers and aliasing of 
Middle and Medium while still limiting to an enumeration.  Check it out 
at 
<http://www.semanticweb.org/wiki/Test_allows_value_number#Test_pseudo-numbers> 
  I described this a while back in the mailing list message "tip: 
flexibility with Allows_value in 1.0, replaces enumerations" and just 
added the idea to the doc in 
http://semantic-mediawiki.org/wiki/Property:Allows_value

--
=S Page

-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] Special notation of numbers

2008-04-15 Thread S Page
DanTMan wrote:
> Has anyone attempted to get SMW to support special types of number 
> notation, basically where multiple numbers of different units are 
> written out.
> 
> Basically such as [2ft 5in] or the classic format [2'5"]

Nobody as far as I know.

You could write a custom datavalue that parses it, similar to 
SMW_DV_GeoCoords.php.  Trying to add it into SMW_DV_Linear.php to give 
you unit conversion would be challenging, as SMWLinearValue just relies 
on SMWNumberValue's parsing.  Maybe you'd parse once to get (value=2, 
unit="ft 5 in"), then notice that convertToMainUnit() fails, so parse 
again to see if there's a second value.

It would be a lot easier to support multiple units only in display, 
something like
   [[display units::"%dft %.2fin", meters, km]]
and you'd beef up SMWLinearValue->makeConversionValues() to parse this 
sprintf-like format.

FWIW the GNU units program http://www.gnu.org/software/units/ , the most 
impressive conversion program I've found, doesn't attempt multiple 
units, nor does Java JSR-275 (units).  Come on United States, Liberia, 
and Myanmar, get with metrication ;-)

--
=S Page

-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] Database Layout

2008-04-01 Thread S Page
Lerman, Adam W wrote:

> Does anyone have an ER diagram, or know enough about how the SMW 
> database works to create one.
I don't know.

>  I want to know what the database does when 
> you perform each of the actions that you can with SMW.

That's nicely restricted to the file includes/storage/SMW_SQLStore.php. 
  All or nearly all of the update and querying is through abstract 
functions like SMWStore->getPropertySubjects() and getQueryResults() 
which class SMWSQLStore implements.

User Ajohnson wrote 
http://semantic-mediawiki.org/wiki/Semantic_MediaWiki_database_tables 
which documents many of the tables.

>  I want to be able 
> to understand what it is doing.

I use phpMyAdmin to look at the tables in wikidb, and turn on SQL 
logging in MediaWiki to see the database queries.  The special pages are 
fairly easy to understand, semantic searches are complicated!

If you figure anything out yourself, please document it in 
http://ontoworld.org/wiki/Semantic_MediaWiki_database_tables or you can 
send it to me.  Copy back all or part of the file from 
semantic-mediawiki.org to update it.

--
=S Page

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


[SMW-devel] service links: fix to make numbers useful, other questions

2008-03-25 Thread S Page
I wanted to link to a service that converts currencies.

This avoids the confusion that arises representing currencies as a 
custom type and converting using [[corresponds to]], because currency 
rates fluctuate.

Currently SMW_DV_Number.php doesn't pass the unit to service links, just 
the numerical value and the rounded integer value.  It's a one-line fix, 
I filed bug 13499.

Can you use parser functions in a service link?  E.g. to not pass an 
empty parameter to a URL.  Or to adjust numbers (the online currency 
converters I've found don't support scientific notation).

Does anyone know of a URL that does physical units conversion?  The 
fancier the better, like handling SI prefixes and unit representations 
like kg•m•s−2?

Thanks,
--
=S

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] Request for renaming "n-ary relations"

2008-03-22 Thread S Page
Markus Krötzsch wrote:
> Re naming: we really used the term only as a technical reference during 
> development (at a time when SMW still had "relations").  ...
> One could also call them "many-valued properties".

Done. 

 
, http://semantic-mediawiki.org/wiki/Help:Many-valued_properties

By the way, http://ontoworld.org/wiki/N-ary_relations and its talk page 
have much discussion of fancier named sub-properties and nested 
annotation that people have suggested or requested in recent threads.

--
=S

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] New: Announcing your wiki to the Semantic Web

2008-03-21 Thread S Page
In February Markus Krötzsch wrote:

> P.S. You can find the results at 
> http://pingthesemanticweb.com/stats/namespaces.php 

That home page's "Recently updated RDF documents" doesn't work as I 
expect.  It shows:

4 mins ago 
http://ontoworld.org/index.php?title=Special:ExportRDF/Ontoworld.org:General_disclaimer&xmlmime=rdf
...
18 mins ago 
http://semantic-mediawiki.org/w/index.php?title=Special:ExportRDF/Sites_using_Semantic_MediaWiki&xmlmime=rdf

But according to 
http://ontoworld.org/index.php?title=Ontoworld.org:General_disclaimer&action=history
 
, the first document was last updated September 9 *2006*, and the second 
on November 28 2007.

What information is pingthesemanticweb using to determine "when 
updated"?  Special:ExportRDF doesn't set the Last-Modified header and 
always sets  to now.  Maybe it does so because 
figuring out whether any part of the RDF graph has changed is 
impossible; however, pingthesemanticweb should assume "unknown" for 
these documents.


(Also, the contact link at the bottom, http://zitgist.com/contact.html , 
is a 404.)
--
=S

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] Extension ResultPrinter output escaping

2008-03-16 Thread S Page
Matt Williamson wrote:

> I wrote a class that subclasses SMWResultPrinter, and it works, except  
> that when it returns its output, it's translating HTML tags into <  
> and >--at least partially.

Surround your output with  ...  tags?
Use the HTML entities < and > for < and > ?

Guessing away,
--
=S Page

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] Language environment

2008-03-16 Thread S Page
Temlakos wrote:

> Can an SMW custom data type access any variable holding a code for the 
> language of the wiki that SMW is running in? I want my custom data type 
> to output tooltip dates in the language of the wiki. Thus far I can get 
> it to recognize an annotated Julian or Gregorian date by remembering 
> which language-specific month-name array it found the month in. But if I 
> annotate a date in an ancient language, and want the output in the 
> Julian or Gregorian date, it defaults to English.
> 
> I thought I could pass the variable $wgLanguageCode from 
> LocalSettings.php to my function to retrieve a month name. But it always 
> defaulted to English. And that's inappropriate if the language of the 
> wiki is /not/ English.

But the language of your wiki *is* $wgLanguageCode, that's what it's 
for.  It determines what anonymous users without a language code see, 
and it's assumed to be the language of the content you're storing in the 
wiki.
http://www.mediawiki.org/wiki/Manual:$wgLanguageCode

If you're asking for the user's preferred language (set in Preferences 
or with the ?uselang parameter to the query string), I think it's 
$wgLang, a language object from which you can do $wgLang->getCode().

I think you're trying to determine the language of a particular page or 
area of a page  where you have an annotation in an ancient language.  In 
my limited understanding, MediaWiki just doesn't have that notion.  The 
"page in other languages" link on Wikipedia pages like [[fr:attribut]] 
is an interwiki link to a *different* site.

There's nothing stopping you from storing multiple languages in one 
wiki, e.g. http://meta.wikimedia.org/wiki/Meta:Interlanguage_links and 
our own http://semantic-mediawiki.org/wiki/Help:User_manual , but all 
you're doing is adopting a convention.  The wiki still has a content 
language, and if you View > Source of a translated page in a 
multilingual wiki you'll see all the XML and HTML language identifiers 
are still "en"(glish).

> What I'd like to do is capture the language code when I parse an input 
> value and store it in a cache.

For what it's worth SMW when parsing numbers uses the wiki's language 
for the comma separator and decimal separator; even if I'm a French 
user, I have to enter 12,345,678.99 on an English wiki.  However, if you 
enable fancy dates with $wgUseDynamicDates then the wiki will parse 
dates in square brackets in the user's preferred format.

> Can I do that?

I'm not sure what you're trying to do.  You've got the wiki's language 
in $wgLanguageCode and $wgContLang and the user's preferred language in 
$wgLang.  In my limited understanding, that's all there is.

You could imagine a wiki where you can tag spans with the xml:lang 
attribute, so you could have a page with chunks in French or Hebrew.  I 
don't think MediaWiki does that, maybe an extension adds it.

> What is the scope of $wgLanguageCode? 

It's a wiki global, hence "wg".  If you want to access a $wg value, just 
declare
global $wgLang;
at the top of your function, don't pass it around.  You *may* be able to 
get away without this global line for some $wg variables, but don't rely 
on it.


I hope this helps, I'd love to be proven wrong.
--
=S Page

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] Use or lack thereof dublin core and revision history metadata

2008-03-13 Thread S Page
Peter Ansell wrote:

> 1. Why does the semantic mediawiki ontology not use dublin core to
> subclass its essential properties?

I'm not sure what you mean.  SMW doesn't impose a particular ontology on 
annotations (except for its representation of MediaWiki categories).
However, you can "import" dc terms and tie SMW properties to them so 
that when exported as RDF they use the dc ontology.  E.g. an article 
about a research paper that says [[Has author:John Doe]] can export RDF
   John Doe
instead of
   John Doe

> 2. What is being done to make revision histories integrate with the
> wikipage metadata? Use of FOAF in this area maybe?

SMW annotations are not about the wiki article, they're about the thing 
described by the article.  See
   http://semantic-mediawiki.org/swivt/1.0#Subject

There's already MediaWiki code to export article information, see
   http://meta.wikimedia.org/wiki/RDF_metadata
   http://www.mediawiki.org/wiki/Extension:RDF
However, this code seems disabled in most installations, e.g.
   http://ontoworld.org/wiki.phtml?title=Berlin&action=dublincore

I'm no expert on this stuff, please clarify.
--
=S Page

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] Editing pages on semantic-mediawiki.org

2008-03-12 Thread S Page
Sergey Chernyshev wrote:

> I just tried to fix a link on semantic-mediawiki.org 

Thanks, what link?

> <http://semantic-mediawiki.org> and noticed that I can't register there.
> Is there any particular reason why the site is closed for public 
> contributions?

In thread "Re: SMW documentation ..." back in December Markus Krötzsch
stated:

- - - - -
This was done as part of our start-up phase, so as to not make it into
another (confusing) testing site before even having a basic structure.
We still wonder whether or not we should open it for editing (pro:
people could contribute, its wiki-style; contra: it could again develop
into a ontoworldish collection of semi-official docus, demo pages, and
tests of (partly nonexistent) features that we would have to watch all
day). I normally don't expect the documentation and homepage of an open
source tool to be written by all users, but then there is the wiki-way
... hard question.
- - - - -

For now you can comment and write text on the talk pages of the help
docs on ontoworld.org, or e-mail suggestions here.  Or you can send them
to me privately, or you can file bugs.

My ideal situation would be documentation continues to have limited
editors but users could comment on it *on* the page, like PHP's "User
Contributed Notes" (e.g. http://us3.php.net/manual/en/function.reset.php
) or Adobe's LiveDocs.  I don't know if there's a way to do that in
MediaWiki.

MediaWiki moves user comments to Talk pages which are hard to monitor,
especially when they're 95% disorganized historical comments.  And I
don't know how to allow anyone to edit the semantic-mediawiki.org Talk
pages but continue to restrict the other namespaces.  Hence if you want 
to comment in wiki text you have to do it on on ontoworld.org.

Suggestions welcome!
--
=S Page

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] [Semediawiki-user] Multilingual SMW

2008-03-07 Thread S Page
The translation code is in SMW 1.0, but you have to enable it in 
SMW_Settings.php: set
   $smwgTranslate = true;


Then, if you've set a different language in your user prefs or you tack 
on ?uselang=fr, Special:Browse does indeed translate what it can!

You don't actually have to have multiple wiki translations running 
locally, just put [[fr:French word]] on a lot of your SMW pages and 
Special:Browse will provide them to French speakers.

There seems to be at least one bug in French handling, I found 
Propriété:situé à becomes Propriété:situé �, probably a multibyte issue.

--
=S

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] Virtual Instances

2008-03-03 Thread S Page
> dedicating an entire page to such a small piece of trivia feels like
> overkill.

Try it (you can use ontoworld.org if you like) and see.

This is another topic that's come up before, see the long thread on 
semediawiki-user
   Subject: Modeling "third party" relations on Semantic Mediawiki page?
that morphed into
   Subject: Creating Triples Anywhere in a Semantic Wiki
<http://www.mail-archive.com/[EMAIL PROTECTED]/msg00354.html>

SMW's fundamental model is the subject of a semantic annotation is the 
entity described by the article where the annotation appears.  What's 
the harm of creating pages "Earth-0 (DC world)", "Earth-16 (DC world)", 
etc. so that not only can you generate 
http://en.wikipedia.org/wiki/List_of_DC_Multiverse_worlds, but also 
these articles can participate in Special:Browse, "Pages using the 
property Inhabitants”" lists, etc.?  Wikipedia has a bias against "stub" 
articles but a SMW wiki is going to have lots of pages with just a few 
semantic annotations, whose raison d'être is to provide material for 
semantic searches.

To ease organization you could make these subpages with a slash:
"DC worlds/Earth-0", "DC worlds/Earth-16", etc.  Mediawiki displays a 
breadcrumb back to the top page, and there's a {{List subpages}} 
template on  Wikipedia that you can copy which lists all subpages.  Note 
that by default Mediawiki does not enable the subpage feature in the 
main namespace; read http://meta.wikimedia.org/wiki/Subpages#Administration
for the LocalSettings.php change that enables this.


You're welcome to try to code both your ideas:
* Using the subsection's anchor name as subject of link
* Using "tag which isolates a portion of the page from the rest of it 
for the purpose of semantic annotations"
and see how you get on.  You will no doubt run into issues with factbox 
display, query semantics, parsing, database representation, collisions, etc.

> I'm not (yet) familiar with how the database is set up;

You can use something like phpMyAdmin to look at the wikidb tables in 
your installation, or read function setup() in 
<http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore.php?revision=HEAD&view=markup>
 
to just see the SMW table format.

>  is there
> anything that forbids hash-marks in page names?

* From a parsing perspective:
   MediaWiki's parsing of a wiki link puts the section after the 
crosshatch in the hyperlink in HTML, so that your browser will jump to 
the right place when you click it.  But both MediaWiki's pagelinks table 
and SMW's smw_relations table don't store this section information.
* From a design perspective:
   Maybe coincidentally, the URI spec 
http://www.ietf.org/rfc/rfc2396.txt states that the fragment identifier 
after the crosshatch is *not* part of a URI, it's part of the reference 
to a URI.
* From an implementation perspective:
   SMW probably assumes annotation subject == (page title === page ID), 
so you'd have to either correct this assumption or add a separate page 
subsection.

MediaWiki is hack upon hack, so don't let any of this stop you trying ;-)

> you might include
> the text '[[Celestial class#Dysnomia::Moon]]', to semantically
> indicate that Dysnomia is a moon. 

That's confusingly different from subject-predicate-object order of RDF 
triples, something like [[#Dysnomia::Celestial class::Moon]] would be 
much better.

Enjoy wiki hacking or code hacking,

--
=S Page

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] Classes vs. Categories

2008-03-03 Thread S Page
(Mr. Lang/Dreamweaver, welcome to SMW!)

Yaron Koren wrote:
> The topic *has* been discussed before,
Indeed, e.g. 
http://www.mail-archive.com/[EMAIL PROTECTED]/msg00503.html

> [The documentation] should be updated to indicate that this is a
> description of the way things *currently are*, 
> not at all a recommendation

I think I wrote 
http://semantic-mediawiki.org/wiki/Help:RDF_export#Categories, and I'm 
not sure how to improve it.  The way SMW's RDF export works is a fact, 
and "There are many usages of MediaWiki categories that conflict with 
these semantics" is another fact, it's not a recommendation.

Indeed, this topic arises regularly.  However, I believe most SMW wikis 
don't do anything with RDF export.  (If anyone is doing slick reasoning 
with SMW's RDF, speak up and tell us more!)  In those wikis, conflicting 
usage of MediaWiki categories won't hurt.  Somewhere there may be a 
Neuromancer, Wintermute, or WOPR blowing a fuse trying to understand 
your wiki, but that's not your problem.

*If* accurate RDF representation of your wiki matters, then you have to 
decide how to handle categories.  There is no best practice here. 
Dataweaver's proposal is doable, though a bit complex.

BTW, many have played around with categorization semantics on ontoworld.org:
   http://ontoworld.org/wiki/Property:About
   http://ontoworld.org/wiki/Help_talk:Category
   http://ontoworld.org/wiki/Property:Has_category
   http://ontoworld.org/wiki/Category:Topic
   http://ontoworld.org/wiki/Property:Classified_by
   etc., etc.
After a while the words just turn to mush .  Keep it simple!

In my opinion, rather than SMW standardizing on any one elaborate 
handling of categorization, it would be better if SMW generalized some 
of the useful behavior of MediaWiki categories, such as:
* Displaying anything annotated [[subClassOf::Xyz]] when you view 
article Xyz, the same way MediaWiki displays subcategories of Category:Xyz
* Performing transitive queries when you query any property annotated as 
owl:TransitiveProperty,  the same way SMW queries for articles in 
subcategories when you query on Category:Xyz.

Then you could leave categories with their strict interpretation in SMW, 
while adding your own classification properties that have useful 
behavior.  Note that even without PHP code hacking you can make your own 
Property:TopicRelatedToSubclassOf have useful behavior by putting inline 
query templates on pages.

> - I believe that 
> categories should only ever be used to indicate class. Otherwise, as you 
> note, the current system would need a variety of changes to be able to 
> differentiate the one kind of category from the other.

Exactly.

Jonathan "Dataweaver" Lang originally wrote:

> 2. Add a new special property: 'Class'.  Property:Class has type
> Category; additionally, only categorization by means of Property:Class
> would map to rdf:type and rdfs:subClassOf;

I'm pretty confident a SMW wiki's admin can establish such mappings by 
creating articles named MediaWiki:Smw_import_{rdf|rdfs}, see 
http://semantic-mediawiki.org/wiki/Help:Import_vocabulary.  You might 
consider mapping to SKOS, it's more detailed.
ontoworld.org does not have import pages for these ontologies because it 
might mislead users to think SMW itself implements their semantics.

To make *only* your Property:Class have this mapping, you'd have to 
modify SMW_SpecialExportRDF.php.

> I'd also add a special property 'Category'.

Note that there were and probably still are bugs in SMW when you name a 
property the same as a namespace, especially with your proposed 
Property:Category.  Plus it's very confusing.

Yaron later wrote:
> if I
> were designing that wiki about cities, I'd probably create a category
> called "Cities", that held every page that was a city, and one called
> "City information" that held pages that were on the topic of cities in
> general.

Me too.  The English Wikipedia approach is to use the singular 
[[Category:City]] for pages on the topic.  (BTW I tried to rename 
ontoworld's singular category names, but its users have the notion "is_a 
City" and prefer singular category names.)

There's a lot of ways to do it...

Cheers,
--
=S Page

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] Two questions/bugs/requests regarding #ask

2008-02-25 Thread S Page
Daniel Israel wrote:
> I've upgraded to 1.0.1, and I have two questions regarding #ask 
> syntax (take these as questions about syntax, bug reports, or 
> feature requests, as appropriate).
> 
> 1. In the old syntax one could specify alternate headers for inline 
> queries using [[Capital of::*|Cap]].  Is there a similar 
> syntax for #ask?  If not, can it be added?  Something like {{#ask 
> [[Capital of::*]] | ?Population|Pop }}.

Yes, the alternate header follows an equals sign '=' (and comes after 
any # specifying a desired custom unit or formatting).  For example,

  | ?Population=Pop | ?Located in=deep in the heart of
  | ?Area#km²=Coverage

This is now documented,
http://semantic-mediawiki.org/wiki/Help:Semantic_search#Heading_label

> 2. Not equal doesn't seem to work for Type::Page.  I.e. 
> [[Population::100]] and [[Population::!100]] both work, but 
> [[Located in::Europe]] and [[Located in::!Europe]] both return a 
> list of things located in Europe.

Yes, I believe none of the comparators (> < ! ~) work for properties of 
Type:Page (relations between pages) or for conditions on categories. 
They only work with what used to be called attributes.

This and several other details of the various comparators are now at 
http://semantic-mediawiki.org/wiki/Help:Semantic_search#Comparators

Thanks to Guy Heathcote and Markus for e-mailing explanations of 
{{#ask:}} that got me started.

Folks, keep e-mailing any and all comments on the docs.
--
=S Page

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] Case insensitive property pages

2008-02-18 Thread S Page
Sergey Chernyshev wrote:
> It looks like property pages are matching properties case insensitively.

Yes, for properties of type:Page.

Also a number of other features are case insensitive for property names 
of Type:Page.  For example, a search by property,
http://www.techpresentations.org/Special:SearchByProperty?property=Presenter+ComPaNY&value=SiX+ApaRT

You mentioned before that in an inline query, an object page name is 
case insensitive, and filed bug 
https://bugzilla.wikimedia.org/show_bug.cgi?id=11689
I also found the property to display is case insensitive. For example:
  [[Presenter Company::Six ApaRT]] | ?PrESenter_ComPANY
works.

In your bug Markus commented:
"I have now changed all SMW created database tables to use "binary" for 
their VARCHAR fields, just as MediaWiki does. This should force 
collations to be case-sensitive on new installations. ... "

Did you update your installation with `php SMW_refreshData.php -vpf  && 
  php SMW_refreshData.php -v`as he suggested in the bug to make this DB 
change?
If so, then I guess these are a different bug/bugs.

Interestingly, I found the property name and a subject page name *are* 
case sensitive:
   [[Presenter ComPaNY::Six Apart]]
doesn't work, nor does
   [[OpeNING the Social Graph]]


NOTE that all this is only true for a property of Type:Page.  Properties 
of a different type like Type:URL or Type:date are case-sensitive in 
these situations.

> It means that both pages are searching case insensitively and returns 
> relations for both capitalizations which is wrong (at least I can't find 
> which page gives me trouble without going through all of them).

It does seem different to MediaWiki's capitalization "style" (I can't 
really call it a rule because it's a mess), which is the first letter 
can be upper- or lower-case, but in the rest of the title capitalization 
matters.
(I hope techpresentations.org runs a stock SMW, because I tested all 
these on your Web site ;-) ).

A workaround might be to search for specific text on your wiki using a 
case-sensitive search engine.

--
=S

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


[SMW-devel] SearchByProperty wildcard and substring features?

2008-02-02 Thread S Page
http://semantic-mediawiki.org/index.php/Help:Browsing_and_searching used 
to say:

Furthermore, the page Special:SearchByProperty features a simple search 
form where one can explore the wiki's semantic content by specifying 
(parts of) the searched semantic annotations. This search is much less 
complex than inline queries, but offers some alternative capabilities, 
such as wildcard search for properties, and sub-string matching in 
annotation labels.


 From trying it and looking at the code I think in SMW 1.0 there's no 
"parts of", there's no wildcard search, and there's no sub-string 
matching.  I think those were in the obsolete SearchTriple page.

So I took all that out.

--
=S Page

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] Subcategories in ask results

2008-01-15 Thread S Page
Markus Nitsche wrote:
> in Version 1.0 of SMW, ask query results for a certain category do not 
> only contain the articles of this category but also its subcategories. 

You're right.  That seems new to me, I'll resurrect my 0.7 to see if 
it's a regression.

This seems to contradict Markus Krötzsch's comments in 
http://ontoworld.org/wiki/SMW_unit_test:Test_relation2 that by default 
"only "content pages" (default: normal pages and image pages) are 
considered in queries".

Maybe someone has altered $smwgQDefaultNamespaces on ontoworld.org?

Anyway, you can get the behavior you seek by explicitly mentioning the 
namespace you want.  In your case it's the main unnamed one, thus add 
[[:+]]:

  [[:+]]
  [[Category:City]]
  [[Located in:=*]][[Location of:=*]]


--
=S

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


[SMW-devel] orphaned Relation_talk pages?

2007-12-11 Thread S Page
In the upgrade from 0.7 to 1.0, Attribute pages become
Property pages, and if you run SMW_unifyProperties.php it moves Relation 
pages to the Property namespace.

However, I think Relation talk pages are left behind, e.g.
http://ontoworld.org/wiki/Relation_talk:Is_a
I didn't see any orphan Attribute_talk pages; perhaps because the
Attribute namespace becomes the Property namespace, the talk pages are
automatically migrated.

I'm not sure this needs fixing, but if I'm right I think either INSTALL or
http://semantic-mediawiki.org/index.php/Upgrading_from_SMW_0.7_to_SMW_1.0
should mention this.

--
=S



-
SF.Net email is sponsored by: 
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


[SMW-devel] swedish collation error on semantic-mediawiki.org with category query and some pages

2007-12-08 Thread S Page
http://semantic-mediawiki.org/index.php/Help:Semantic_search and
http://semantic-mediawiki.org/index.php/Help:Inline_queries both give error:

Database error
A database query syntax error has occurred. This may indicate a bug in
the software. The last attempted database query was:

 (SQL query hidden)

from within function "SMW::getCategoryTable". MySQL returned error
"1267: Illegal mix of collations (latin1_bin,IMPLICIT) and
(latin1_swedish_ci,IMPLICIT) for operation '=' (localhost)".


Doing a semantic query of category does trigger the error.
http://semantic-mediawiki.org/index.php/Special:Ask?q=[[Category%3AFoo]]

All use of category in Help:Semantic_Search is inside , so I'm
not sure why that page calls getCategoryTable.

Stefano Costa had a similar collations error, see e-mail October 22
2007, "[Semediawiki-user] error in Special:Types page".

--
=S


-
SF.Net email is sponsored by: 
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


[SMW-devel] lots of invalid Relations in Special:Wantedpages, at least on ontoworld.org

2007-12-04 Thread S Page
http://ontoworld.org/wiki/Special:Wantedpages lists lots of obsolete 
Relation: pages with many links, e.g. Relation:Author.  But in all my 
checking so far of http://ontoworld.org/wiki/Special:Whatlinkshere, 
those pages don't link to Relation:Author.  They have the annotation 
[[Author::someone]] that correctly links to Property:Author.  The bogus 
link to the old page goes away if you edit the page (purge doesn't seem 
to be enough).

Could someone run SMW_refreshData.php on ontoworld.org?

Thanks,
--
=S Page

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


[SMW-devel] SMW documentation (Re: ask query format=template)

2007-12-04 Thread S Page
Thomas Bleher wrote:

>> I really think that SMW requires a better documentation on new
>> formats of queries, #ask and subqueries. Because the only
>> documentation I've used is outdated:
>> http://meta.wikimedia.org/wiki/Help:Substitution
>> e.g. no new features, no subqueries here and so on..
> 
> ??? This page mentions SMW, but it's hardly related to it.
> Have you looked at ontoworld.org or http://semantic-mediawiki.org/?

Specifically, 
http://semantic-mediawiki.org/index.php/Help:Semantic_search for the 
query syntax, and 
http://semantic-mediawiki.org/index.php/Help:Inline_queries for the 
parameters to .

> I agree that the wiki pages there need improvement,

Never not the case ;-)

>  and hopefully that
> will happen once 1.0 is released 

I've documented many features in SMW 1.0 pre-alpha on ontoworld.org, 
using Template:SMW_prototype_feature to separate them from 0.7.  But not 
#ask, it's newer still.

I did not know until now that the download link on SourceForge provides 
semediawiki-1.0-RC2 --
--> *Congratulations all* !!
Therefore a new user will get 1.0, therefore there's no need to maintain 
0.7-specific information.  That should simplify the help a lot, though 
#ask documentation should still use {{SMW prototype feature}} until the 
SourceForge download has an implementation.

> But
> such documentation doesn't write itself. Maybe you can rework the wiki
> pages on semantic-mediawiki.org with the things you have already learned
> about SMW 1.0.

semantic-mediawiki.org has restricted access.  It has a copy of the 
ontoworld.org help files, I think from around November 28 2007.  Anyone 
can edit ontoworld.org/wiki/Help: pages and someone may pick up their 
edits for the more official documentation; but that someone won't be me 
until mid-December.

Regards,
--
=S Page

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] {{#ask}}

2007-11-29 Thread S Page
Denny Vrandečić wrote:
> Any idea how to add page and wiki-meta data to SMW? The problem is, by 
> simply adding further special properties (last modified date, creation 
> date, etc.) it seems to clutter the property namespace... Well, doing 
> the implementation is not trivial either, but heck  :)

Perhaps a special virtual namespace, e.g. [[ArticleMetaProperty:Last 
modified date]] ?

The SMW query code would notice this virtual namespace and retrieve the 
metadata.  For extensibility, it could call back into custom code that 
gets a particular metadatum property; though appending extra SQL code 
seems very fragile.  And doing this really ties SMW into MediaWiki 
database internals.

Some of the names you want to query on are in 
http://meta.wikimedia.org/wiki/Help:Variable, like 
{{REVISIONTIMESTAMP}}. But this missing things like "username who last 
modified", "page size", etc.

Hard to do, hard to maintain, hard to extend, but it would be very useful.

--
=S

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] inline warnings are crawled by Google

2007-11-06 Thread S Page
Sergey Chernyshev wrote:

> It seems that inline warnings are being crawled and indexed by Google 
> which is quite bad.
> 
> Here's home Google listing for one of my pages looks:
> 
> *JavaScript: The Good Parts* - Technical Presentations
> <http://www.techpresentations.org/JavaScript:_The_Good_Parts>
> 
> warning.pngSorry, URIs from the range
> "http://www.techpresentations.org{{#mediapath:*JavaScript* *The Good
> Parts*.jpg}}" are not available in this place. *...*
> www.techpresentations.org/
> <http://www.techpresentations.org/>*JavaScript*:_The_*Good*_*Parts*
> - 18k -
> 
> 
> I fixed the error and google is probably going to update it eventualy, 
> but still, it's not very good idea to have embedded HTML in there - 
> maybe it's better to have them inserted using JS instead... it might 
> help with enabling/disabling it on per-user basis as well.

You might be able to use the googleoff/on comment tags.  You want to 
turn off snippet and index, but you can probably just turn off 
everything with

   warning HTML stuff


Details at 
<http://code.google.com/apis/searchappliance/documentation/46/admin_crawl/Preparing.html#pagepart>
This definitely works for the Google Search Appliance, but I can't find 
conclusive evidence whether Google's own Web crawler respects these tags.

Google tries to be smart about what to display in snippets, I'm not sure 
what heuristics work these days to discourage it.  Try looking at 
Google's cached version of your page for clues.  With JavaScript 
enabled, the SMW warnings are surrounded by , but the Google crawler sees the page with the warning in a 
regular .

<http://googlewebmastercentral.blogspot.com/2007/09/improve-snippets-with-meta-description.html>
 
suggests you can control the snippet using a
   tag, you might be 
able to change your skin to output something here.

You can turn off the snippet altogether with
 ,
see <http://www.google.com/support/webmasters/bin/answer.py?answer=35304>

--
=S Page

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] restoring XML backup

2007-11-02 Thread S Page
cnit wrote:

> Are the old MW 1.10/SMW 0.7 XML backups compatible with
> MW 1.11/SMW 1.0RC1?

Whoa, slow down.  Does your new installation work?  When you follow the
exact instructions in the INSTALL file under "Testing your
Installation", do you get the expected results?

Since you're having problems with categories (see later), try making a
few nested subcategories and doing queries on them.

>  I am trying to import my backup into the new
> installation,  but it throws such error (smw_error1.txt).

I don't know if the old backups are compatible.  With each SMW and
MediaWiki update I made a backup but I made the upgrade in-place and ran
the updates scripts and SMWAdmin with no incident, so I never had to try
the backups.

So everything I write is guessing 8-/

   Error in fetchObject(): Table 'yarsu.cats4' doesn't exist (127.0.0.1)

I think "catNNN" are temporary tables that SMW creates in
getCategoryTable() when it makes "a (temporary) table that contains the
lower closure of the given category wrt. the category table."  I'm not
sure why it's failing.  It could be a database-level problem, such as a
permissions issue.  What PHP and MySQL versions are you running?  If you
can make a smaller XML file that fails to import, you can modify
MediaWiki's LocalSettings.php to turn on extra SQL logging, for example:

   ## === from http://meta.wikimedia.org/wiki/How_to_debug_MediaWiki ===
   /**
* The debug log file should be not be publicly accessible if it is
used, as it
* may contain private data. */
   $wgDebugLogFile = 'mediawiki_debug_log.txt';
   # Override DefaultSettings.php
   $wgShowSQLErrors = true;
   ## === from http://www.mediawiki.org/wiki/Manual:%24wgDebugDumpSql
   $wgDebugDumpSql = true;

and send part of the log file.

In the failures you attached, the MediaWiki import script is parsing the
XML of a page that apparently has an  inline query in it, so it's
calling smwfProcessInlineQuery()

Can you try making a simple query for a category from Special:Ask?  E.g.
[[Help:+]]

I guess you could try removing the inline query (search for ask) from
the XML file and try reimporting.

> 
> After that, I've decided to remove all the Attribute:
> namespace pages from the dump.

It's the inline queries for category that seem to be causing grief, so I
think you should focus on removing those first.

I think you can and should run the SMW_unifyProperties.php maintenance
script after import.

> Drop all the tables,
> recreate the /config, do Special:SMWAdmin, now it throws another
> error (smw_error2.txt)

Almost the same error but now
   Error in fetchObject(): Table 'yarsu.cats1' doesn't exist (127.0.0.1)

so again, the temporary queries of category tables don't work.


> Next, I've removed Relation: namespace pages from the dump.
> Now it produces the following error (smw_error3.txt)
> 
> One of the functions parameter is ' Maybe someone can give me an advice which other pages shall I
> remove from the dump, to do not interfere with SMW 1.0RC1? I can
> recreate Attribute pages manually to the Property namespace,
> just a few pages - not much of work...


I would remove anything that has an  query in it, and/or anything
that has the mysterious extension or template that's generating the
class="tbl stuff.

I hope these guesses help.
--
=S Page


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] Bug in page-enumerations handling, plus fix

2007-10-30 Thread S Page
Yaron Koren wrote:

> First of all, I don't know whether I should send bug reports to this 
> list, or put them on Bugzilla, or both... is there a recommended protocol?

This is fine.  The gold standard would be:
* Create a page on http://ontoworld.org in Category:Testpage showing the
bug and using [[Template:Bugged]]
* Enter a bug in http://bugzilla.wikimedia.org whose URL field
references back to the page on ontoworld.org
* Attach a patch to the bug (I use Eclipse with PHPEclipse, it has a
Team > Create patch... command)
* Send an e-mail here.

but "half a loaf is better than nothing" (and nothing is better than
RDF, ergo half a loaf is better than RDF ?-)

I reproduced your bug at
http://ontoworld.org/wiki/Test_allows_value_wikipage and filed bug 11820.

Your analysis below looks right to me.  I wonder whether, in that loop,
$value->setUserValue();
should also/instead reset member variables in subclasses, such as
m_title in SMWWikiPageValue.  I think error paths can leave other member
variables like m_id and m_textform set to old values, and it's unclear
to me which functions are responsible for resetting.

Anyway, I checked in your fix, hoping I don't trash Subversion!

Thanks,
--
=S Page

> Anyway, there's a bug in the handling of properties of type "Page" that 
> are enumerations - fields that have this property get a "not on the list 
> of possible values" error on the screen if they have a value other than 
> the very first one on the list. I traced this problem, and found the 
> issue: a variable is created, in "SMW_DataValue.php", to loop through 
> the list of allowed values, checking each one against the current value. 
> In the case of a wiki page, however, that variable keeps a cached 
> version of its title, that is set the very first time and then is never 
> reset. There are are various ways to solve this problem, but the easiest 
> might be to change the function parseUserValue() in the file 
> "/includes/SMW_DV_WikiPage.php". You can add a new line after line 26, 
> so inste ad of
> 
> $this->m_value = $value;
> 
> ...it now reads
> 
> $this->m_value = $value;
> $this->m_title = null;
> 
> This will prevent the old value of "m_title" from getting read and used 
> in place of the actual value.
> 
> -Yaron



-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] Hiding some information

2007-10-25 Thread S Page
Asheesh Laroia wrote:
> Is it possible to hide some attributes so that only admins can see them? 

 From what I know of the code, not easily.  When a page is saved, SMW 
parses its annotations and stores the semantic annotations in tables. 
There's a smw_attributes table with the page ID, the property name, and 
its value.  No access control at the database level.

Yes, you could add a special property Only_for_admins and modify the SMW 
code to check this before it does anything with a property.  SMW 1.0 
tends to create a DataValue whenever it deals with a property so the 
change might be well-encapsulated.

HOWEVER,
Normally the User:Asheesh_Laroia page would form the subject of both the 
public Property:Email and the private Property:telephone, so both 
properties have to be specified on the same page.  So how are you going 
to have a partly-private page in MediaWiki?  Are you thinking of having 
a separate private details page that is somehow tied in with the public 
page?  That makes querying much harder.  Maybe you could have a separate 
namespace for Confidential:Asheesh_Laroia and modify SMW to look up in 
that as well if the user is an admin.

I'm mostly speculating, hope this helps,
--
=S Page


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] additional geographic coordinate input form

2007-10-16 Thread S Page
Dan Thomas wrote:
> It seems the degree symbol is required for SMW to recognize a geographic 
> coordinate.  US keyboards typically don't include this symbol making 
> entry difficult for end users.  I suggest supporting lat/long in 
> positive/negative decimal degrees as an alternative input form.  e.g.; 
> 38.926832, -77.03201 for Washington, DC.

You can enter positive/negative decimal degrees in SMW 1.0 RC1, but 
you're right that you must provide the degree symbol ° or its HTML 
numeric entity code °.  I filed enhancement bug 11679.

I updated http://ontoworld.org/wiki/Type:Geographic_coordinate with, I 
believe, all the supported characters and separators.  You could tell 
users to copy and paste then modify a working format from that page.

Changing the code to not requiring a degree symbol is tricky.  I think 
the code needs a degree symbol to give it something to split on.  Note 
that in some languages comma is also a decimal separator 
(smw_decseparator in the languages file) so you can't split into two 
parts on comma.  Is there some other standard compact format for 
coordinates?  Some tests are at 
http://ontoworld.org/wiki/Geographic_coordinate_test
This isn't a regression from 0.7, it doesn't work there either.

As a workaround you could use a template like 
http://en.wikipedia.org/wiki/Template:Coord and insert the degree 
symbols in the semantic annotation it generates.

You can't use the character entity reference for degree (°) and some 
other entities and decimal references for minutes and seconds, which 
seems an accidental oversight.  I came up with a patch to 
SMW_DV_GeoCoords.php for that.

--
=S Page

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] News on SMW 1.0

2007-10-14 Thread S Page
Markus Krötzsch wrote:

> (1) "Relations" and "Attributes" are joined and become "Properties"

and later
> * Alias strings for all SMW elements. English labels are allowed in all
>   languages, names of old SMW elements still work as aliases for their
>   replacements.


Since the 0.7 Attribute namespace becomes the 1.0 Property namespace,
does it make sense to make the "Attribute" namespace an alias for the
"Property" namespace?  Would that mean wiki links to e.g.
[[Attribute:Area]] would still work?  All such links are broken currently.

(The great news is most use of the attribute and relation namespaces is
implied by := and ::, and those automatically refer to Property after
upgrading.)

--
=S Page


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


[SMW-devel] coding: TypeHandlers and OldDataValue

2007-10-03 Thread S Page
I wrote code to support specifying the sort order of enumerations, much 
like Ittay Dror originally proposed:

  [[allows value::Enhancement=-1]]
  [[allows value::Trivial=0]]
  [[allows value::Minor=3]], etc.

But I wonder about the status of DT_Enum.php.  The newer datatypes 
extend SMWDataValue, while the old type handlers rely on creating 
instances of SMWOldDataValue with a comment "///TODO migrate to new system".

Markus, are you intending to convert all the SMW_DT types?  If so, I 
have a patch for Enum that migrates it to DataValue and another patch 
that adds the ordering enhancement.

--
=S Page

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


[SMW-devel] SMW_unifyProperties.php and Re: [Semediawiki-user] A note on using SMW SVN

2007-10-01 Thread S Page
Markus Krötzsch wrote:

> * (maintenance script) SMW_refreshData.php 

There's another maintenance script, SMW_unifyProperties.php.  It move 
all pages in the Relation namespace to new pages in the Property 
namespace.  (The Attribute namespace becomes the Property namespace in 
SMW 1.0, so attribute pages become property pages automatically.)  When 
I ran SMW_unifyProperties.php:

   Checking if properties need to be unified
   Unification is required. 9 relation pages need to be moved.
   1 conflicts have been detected.
   Please unify these conflicts manually.
   Moving 8 pages now.
   Unify properties script done.

After this all my Relation pages were #REDIRECTs to Property pages, 
except for the one conflict, a Relation:Climate page that conflicts with 
my former Attribute:Climate page.

The script works and seems useful, so I documented it in 
http://ontoworld.org/wiki/Upgrading_from_SMW_0.7_to_SMW_1.0

The only change I suggest is to always print the name of any conflicting 
pages, since it's hard to find the conflicting Relation pages -- you 
still have lots of pages in the Relation namespace, but most are #REDIRECTs.

After running this you still need to find every link to Relation: or 
Attribute: in your wiki and change to Property:.  I'm not sure how to 
script this.


BTW, both SMW_unifyProperties.php and SMW_refreshData.php report the 
same set of warnings (below) about
   $wgAutoloadClasses[SMWResultPrinter] = $smwgIP . 
'/includes/SMW_QueryPrinter.php';
   ...
should these array keys be in single quotes?

$ ../../../php/php.exe SMW_refreshData.php -v

Notice: Use of undefined constant SMWResultPrinter - assumed 
'SMWResultPrinter' in 
C:\xampplite\htdocs\mediawiki\extensions\SemanticMediaWiki\includes\SMW_GlobalFunctions.php
 
on line 81

Notice: Use of undefined constant SMWTableResultPrinter - assumed 
'SMWTableResultPrinter' in 
C:\xampplite\htdocs\mediawiki\extensions\SemanticMediaWiki\includes\SMW_GlobalFunctions.php
 
on line 82

Notice: Use of undefined constant SMWListResultPrinter - assumed 
'SMWListResultPrinter' in 
C:\xampplite\htdocs\mediawiki\extensions\SemanticMediaWiki\includes\SMW_GlobalFunctions.php
 
on line 83

Notice: Use of undefined constant SMWTimelineResultPrinter - assumed 
'SMWTimelineResultPrinter' in 
C:\xampplite\htdocs\mediawiki\extensions\SemanticMediaWiki\includes\SMW_GlobalFunctions.php
 
on line 84

Notice: Use of undefined constant SMWEmbeddedResultPrinter - assumed 
'SMWEmbeddedResultPrinter' in 
C:\xampplite\htdocs\mediawiki\extensions\SemanticMediaWiki\includes\SMW_GlobalFunctions.php
 
on line 85

Notice: Use of undefined constant SMWTemplateResultPrinter - assumed 
'SMWTemplateResultPrinter' in 
C:\xampplite\htdocs\mediawiki\extensions\SemanticMediaWiki\includes\SMW_GlobalFunctions.php
 
on line 86


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] Semantic link for citations

2007-09-29 Thread S Page
I'm responding, but I don't have the answers.

Jeff Thompson wrote:
> What are the plans in Semantic Mediawiki to capture citations?  I ask because,
> for a "cited by" property, the subject is not the article, but a particular
> assertion made within the article.
> 
> For example the article for Germany:
> http://ontoworld.org/wiki/Germany
> says it has
> [[area::357,050km²]]
> 
> This might be followed by a citation link to the World Factbook, but the link 
> is not
> connected in a semantic way.

N-ary relations in 1.0 pre-alpha let you create [[Property:Area]] with
multiple types [[has type::Area; URI]] , and then you can say
   has area  [[area::357,050km² ;
https://www.cia.gov/library/publications/the-world-factbook/geos/gm.html]]

The second value is optional.

I made Property:Area_test Try it,
http://ontoworld.org/wiki/Sandbox#Area_with_citation

This currently exports in RDF as:,

  
   http://www.w3.org/2001/XMLSchema#float";>35705000
   https://www.cia.gov/library/publications/the-world-factbook/geos/gm.html
  

The area type has units m², I think that's why they become an encoded
part of the property name (#m²;).  Within this property, you just
have to know that the second value is a citation.

If you don't like the display format then you could use a template that
provides alternate text after '|'.

There might be a way to tie into Mediawiki's reference support
(http://en.wikipedia.org/wiki/Wikipedia:Footnotes) so that the citation
  appears in a footnote.  I think  information is structural rather
than semantic.


> You might add a property inside the assertion like this:
> 
> [[area::357,050km² [[cited 
> by::https://www.cia.gov/library/publications/the-world-factbook/geos/gm.html]]
>  ]]

That won't work.  Nor can you have the citation in the alternate display
text after '|'.  1.0 seems to better support wiki formatting in the
displayed text, but not a nested property.

> If not this, then are there plans to formally capture citations?

I don't know.  People on this mailing list have discussed the
limitations of n-ary relations as a collection of types rather than
nested properties.

Hope this helps,
--
=S Page


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] Feature request

2007-09-16 Thread S Page
Harold Solbrig wrote:

> The “provides service” feature, in combination with a URL gives us a lot 
> of power when it comes to referencing external resources.  This allows 
> us to change the nature of properties as the Wiki evolves.  We can, for 
> example, begin with a free text (or enumerated) list of country codes 
> and, as some later date, change the “inCountry” property to be a URL 
> with code substituted in the appropriate place.  Something that would be 
> really useful would be the ability to change the type to “Page” and, 
> using a similar substitution mechanism, say something like 
> “[[Country_$1]]”.  Other use cases may include assigning a namespace as 
> well, such as “[[:Category:Country_$1]]” or a in interwiki reference – 
> “[[mw:Country_$1]]”.   While we can simulate this with the URL 
> mechanism, we lose all the advantages of the Semantic portion, as the 
> referenced entity isn’t aware that we are pointing at it.

I'm not quite sure what you're looking for.  You want to change
inCountry from Type:String to be (in SMW 1.0pre-alpha3) Type:Page, i.e.
turn it into a relation, but you want to use “provides service” to turn
the link into  [[Country_$1]]?

I'm not familiar with the provides service code, but I suspect it runs
in the factbox after the semantic markup has been parsed, so that it
can't easily inject new semantic properties into the page.

The way people typically make link rewriting permanently is to run a
batch script on the Wiki.

The way people typically make link rewriting continuously is to use a
template.  For example, you write
   the developers come from {{inCountry|Germany}}
and the template produces
   the developers come from
   [[inCountry::Country_Germany|Germany]] [[Category:Country_Germany]]

If you later change what Template:inCountry does, you can just purge the
wiki pages, using a maintenance script.

But I think I'm missing something, again.  A demo page is worth 500
words.  Can you make a Category:Testpage on ontoworld.org that shows how
you're using service links with URLs and what you want to achieve with
page links?

> If other folks thought that this was a reasonable idea, we would be 
> happy to roll up our sleeves and attempt to “make it so”,  but we don’t 
> want to spend a lot of time on a feature that won’t make it into the 
> main development thread.  

File an enhancement bug, supply code that addresses the bug, and maybe
someone with SVN rights will pick it up and check it in.  Even if not,
you can keep a local copy with your changes and regularly update it to
latest SVN and if there are no conflicts it's not too hard to maintain.

Regards,
--
=S Page


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] dated integer type

2007-09-12 Thread S Page
Jeff Thompson wrote:
> Are you saying development happens in German on some other list?
No, I was just saying Markus and Denny and I think some other developers 
in Germany wrote all the new code since 0.7 (and I thanked them with 
part of the German national anthem).

--
=S

German women, German loyalty,
German wine and German song
Shall retain in the world
Their old beautiful ring
And inspire us to noble deeds
During all of our life.

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] dated integer type

2007-09-10 Thread S Page
Yaron Koren wrote:

> Can you explain the reasoning that went into this [the composite type] 
> decision? 

Sorry, no.  I'm more an early user of Semantic MediaWiki 1.0pre-alpha3 
than a developer.  I'm trying it out, filing bugs, and writing docs but 
AFAIK the development was Deutschland und AIFB Karlsruhe über alles ;-)

--
=S

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] dated integer type

2007-09-10 Thread S Page
Jeff Thompson wrote:
> RDF has two ways to handle this.  I don't think SMW supports either in a 
> direct way.
> 1. Blank nodes.  Instead of a property having a value of type integer, it has 
> a value
>of a composite type that has an integer, date, etc.  Since it is a "blank 
> node" you
>don't need to create a unique URI for it (or its own page in SMW).  "Blank 
> nodes" are
>used in RDF all the time, for example as the nodes in a list, or to 
> mention "the person
>that has email address [EMAIL PROTECTED]" without needing to give that 
> object its own
>unique identifier, and also to make "composite types" like the 
> date/integer you mention.
> 2. Reification.  If your statement is "San Francisco has population 739426", 
> then you make
>a separate object of type Statement where the subject is "San Francisco", 
> the predicate is
>"has population" and the object is "739426".  Then you can extend this to 
> say "this statement"
>is true on the date 2005.  (Since the Statement object is usually a blank 
> node, it kind of
>amounts to the same as option 1.)
> 
> The closest thing I see in in SWM is Type:Geographic coordinate which is 
> basically a blank node
> with a latitude and longitude property.  Are there any plans in SMW to 
> support blank nodes, custom
> composite types, or reification?

I just described SMW 1.0prealpha-3's support for N-ary properties in 
response to [Semediawiki-user] Typed links vs. OWL-relations [1], the 
same applies here.

Property:Population_(on_date) would have [[Has type::Integer; Date]]

The Berlin article would say [[Population (on date)::3405000; 2006-11| 
3,405,000 as of November 2006]]

You can omit values, so you could have lots of optional values for a 
property as Harold Solbrig suggested.  Try it out, 
http://ontoworld.org/wiki/N-ary_relations and 
http://ontoworld.org/wiki/Berlin

Maybe SMW's N-ary feature is your "blank node", I'm not sure of the 
nomenclature.  As I understand it "reification" is more for talking 
about the statement (who made it, when they made it, where it appeared) 
rather than facts within the statement (the date range over which it's 
true, additional facts qualifying it).

Your idea to make an underlying compound datatype for all properties 
with the same set of values is nice; you could then say 
Property:Population [[Has type::Dated_integer]].  But that's not how SMW 
works currently.

BTW, although Type:Geographic_coordinate seems like a compound type, it 
still has to fit all its information into the generic smw_attributes 
database table -- new columns don't magically appear for two float values.

[1] 
http://sourceforge.net/mailarchive/forum.php?thread_name=92475E44-19E0-4D07-A626-8C60A697216E%40rdfined.dk&forum_name=semediawiki-user

--
=S Page

> Harold Solbrig wrote:
>  > Dan,
>  >
>  > Why just integers?  It would seem like it would be useful to be able to 
> add provenance (who, when, where…) 
> information to any property – not just integers.  President:=Johnson  - 1965  
> or hasChild :: Sarah – 2003 
> definedIn:=http://w3.org/sample/prelimVersion 2007-08-07
>  >
>  >
>  >
>  > Harold Solbrig
>  >
>  >
>  >
>  > 
>  >
>  > *From:* [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] *On 
> Behalf Of *Dan Thomas
>  > *Sent:* Saturday, September 08, 2007 7:24 AM
>  > *To:* Semediawiki-devel@lists.sourceforge.net
>  > *Subject:* [SMW-devel] dated integer type
>  >
>  >
>  >
>  > I have run across a concept called 'dated integer' that I propose become a 
> native SMW data type.  As the name 
> implies, one can associate a number with a year:
>  >
>  > population:=9,999 - 2005 or
>  > homeruns:=756 - 2007-08-07.
>  >
>  > Do others think this would be useful?
>  >
>  > --
>  > --
>  > Dan Thomas


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


[SMW-devel] upgrading to SMW 1.0: docs, inline queries, overlapping names

2007-09-02 Thread S Page
Note well that even though SMW 1.0pre-alpha3 is running on 
ontoworld.org, SMW 1.0 is not released!

I started http://ontoworld.org/wiki/Upgrading_from_SMW_0.7_to_SMW_1.0 , 
comments welcome.

1.
I noticed several ontoworld.org pages have the caution triangle in place 
of queries.  A lot of them were doing
 {{PAGENAME}} [[property:=*]]
to get properties from the current page, or {{FULLPAGENAME}} to query 
for the current category.  These generate an error in SMW 1.0pre-alpha3, 
"The part “<>” of the query was not understood. Results 
might not be as expected."

I'm surprised that this ever worked, it doesn't match the 
Help:Semantic_search documentation.


2.
What happens if you have Relation:MyName and Attribute:MyName?  Which 
one wins in the conversion to Property:MyName?  (I neglected to check 
this before I upgraded.)

--
=S

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] property :: and := ?

2007-08-27 Thread S Page
Eep² wrote:
> Asking this again because I never got an answer before on the user list

You probably got ignored because you're simultaneously dismissive and 
ignorant of what SMW tries to achieve.  But hey, I'm just guessing.

You seem to be using Semantic Forms which I understand builds on SMW to 
provide editing forms for template data.  So I can accept some "Why does 
SMW do it that way?" if your primary goal is not annotating wiki text 
with semantics.  You seem frustrated the combination doesn't do what you 
want but haranguing volunteer developers who don't have time to 
understand both code bases won't magically deliver features.

> or on 
> http://ontoworld.org/wiki/Talk:N-ary_relations#Too_complicated.2Fconfusing_and_just_unnecessary

> With the new property, er, property (attribute? option?
 > parameter?),
Property.  Former Relations become a type of property, alongside the 
other property datatypes (strings, dates, enumeration, etc.)

> will it work like  relationships do now with
> [[relationship::name]] where the "::" (double colons) create a link
 > whereas [[attribute:=name]] doesn't create a link?

Quick answer: no.  The type of property determines how it displays. 
Given [[MyProperty:=Value]], MyProperty's datatype defaults to wiki page 
(such properties are relations in SMW 0.7) and SMW will display Value as 
a link.  If you give MyProperty a type, then SMW displays Value 
depending on that type (type:string and type:enumeration appear as text, 
type:email appears as a mailto: link, etc.).

It works this way because the arrow between two pages is 
owl:ObjectProperty and the arrow between a page and a mere datavalue is 
owl:DataTypeProperty.  They're different things.  (Now you're going to 
tell us how that's way too complicated, please see my first sentence above.)

> I ask because 
> I need that functionality for both parameters ("relationship" and
 > "attribute") now in SMW .7 and I hope "property" can do both links
> and non-links as well in the next SMW version...

Here's how to get links and non-links:

1. A page property ("relation" in SMW0.7) is always a link, even if you 
give alternate text.  But you can give it blank alternate text and 
follow with the value: [[MyPageProperty:=Value| ]]Value

2. A string or enumerated property is always text.  But you can give a 
link in its alternate text: [[MyStringProperty:=Value|[[Value.

(It seems in current pre-alpha code you can simply write 
[[MyStringProperty:=[[Value]] ]], but 
http://ontoworld.org/wiki/Type:String says string values cannot have 
double closing brackets in them.)

3. If you don't like typing "Value" twice you can create template(s) 
that expand into one or the other.

I assume you already know this; does this not work well with Semantic Forms?


I've imagined a string variation, call it Type:WikiText, where you can 
reliably say [[MyWikiTextProperty:=[[This Links]] ]] and 
[[MyWikiTextProperty:=This doesn't]].  This raises a whole host of 
parsing and display problems, but would it help you?

 From some of your other posts, perhaps you want to have a 
Type:Enumeration where some possible values appear as links and others 
aren't?  Would a Type:EnumerationWikiText help you (some allowed values 
would contain [[This Links]])?  Or Semantic Forms could know about the 
desired appearance and figure out how to provide the alternate text.

This is just guessing.  If you can explain what you're doing with  a 
test page and why the alternate text workaround isn't satisfactory, it 
might help.


> Also, why require ":=" over simply "::" for creating properties? "::"
 > ("shift+;;") is easier to type than ":=" (requires "shift+;"
> and "=")?

You're assigning a value to the property, hence :=.  IMO colon already 
does too much in MediaWiki.  In current (pre-release) code, :: and := 
are equivalent but :: is only for backwards compatibility.

Regards,
--
=S

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] Issue with printTriples in pre-alpha 1.0 release

2007-08-26 Thread S Page
Harold Solbrig wrote:

> We’re playing around with the pre-alpha release because we can take 
> advantage of some of services, pages and other features.  We encountered 
> a problem in the RDF export – the code drop that we got  converts
> everything to DataTypeProperty, including links (relations) of type 
> “Page”.

I think I reproduced this,
http://ontoworld.org/wiki/SMW_unit_test:Test_ExportRDF

What I'm seeing is if the property doesn't specify its type (which in 
SMW 1.0pre-alpha3 defaults to Type:Page), it exports as 
owl:ObjectProperty, which seems correct.

But if the property says it has_type Type:Page, then it exports as 
owl:DatatypeProperty as you say, which seems a bug.  I filed bug 11076.

 >  We believe that the following change should fix this issue:
 >
 > At what is line 640 in this morning’s current version
 > SMW_SpecialExport.php (printTriples routine), change the “getTypeId()”
 > (which always returns “_typ” in the new scheme of things to
 > “getXSDValue()” which seems to return “_wpg” (web page) where 
appropriate.

I'm not sure your change is the best one.  getTypeId is supposed to 
"Return a short string that unambiguously specify the type of this 
value."  Surely that string should be _wpg, not__typ.
Also getXSDValue() for e.g. a property of Type:Integer returns the 
localized string "Integer:", I'm not sure why it doesn't return "Page" 
instead of _wpg.

But SMW_DV_Types.php is new and unclear to me so you could be right!

Regards,
--
=S Page

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] SMW feedback, futures (was Unify relations and attributes?)

2007-08-14 Thread S Page
Eep² wrote:

> Unnecessary as well; "has president" is the same as "is president of",

No it is not, one is the inverse of the other.  You may be hoping to 
pick one meaning , put [[president::USA]] on the George Walker Bush 
page, and have "George Walker Bush  president  USA" automatically show 
up on the United States page; but SMW 0.7 doesn't work that way except 
in Special:Browse.

>> You can use templates to insert linked text together with attributes into 
>> Wiki pages.
> 
> Example?

http://ontoworld.org/wiki/Template:Between is a simple example. 
http://ontoworld.org/wiki/Template:Distance reformats the parts of a 
quantity for display, makes some parts links, and creates an attribute 
from them.  Other templates on ontoworld.org are much more sophisticated 
but rely on the ParserFunctions extension.

>> Please can you give examples of when you would need to link an attribute 
>> value in factboxes and search results?
 >
> Well, for my 3D game comparison, in comparing various features, I want to 
> have [[effect::weather]] and then [[weather effect::rain]] 
> appear under "effect::weather" (preferably as a type of it without having to 
> specify yet another relationship that appears 
> alphabetically instead of intuitively under the parent relationship, forcing 
> me to use [[effect weather::rain]] instead).

I think you're asking for a way to identify Relation:weather_effect as a 
subproperty of Relation:effect, and for SMW to know about this so that 
the factbox would display subproperties under the parent relation in the 
factbox.  (Also, querying for Relation:effect would find instances of 
Relation:weather_effect .)  Current SMW don't do that.  It's a solid 
idea, Michael Uschold was also asking for rdfs:subPropertyOf support; I 
wish I could remember how to code.  You should file it in the wikimedia 
bugbase as an enhancement request referencing this e-mail thread.

> The 
> problem is types only apply to attributes which don't create links (which is 
> why I have to use relationships and am asking if the 
> upcoming "property" can be displayed as links too). 


How would SMW's datatyping or a unification of attributes and relations 
into properties help you get the factbox display you're seeking?  The 
only datatype that seems relevant is Type:Enumeration, which would let 
you restrict Attribute:Weather_effect to a set of strings ("clouds", 
"clouds (moving)", "fog", and "rain".).  It might be nice to extend this 
to limit the allowed values of a relation, but it's not what you're 
asking for.  Maybe you're just hoping to say "weather_effect [[has 
type::Relation:effect]]", but that's not how datatypes work and I'm 
pretty sure the technical term for what you want is rdfs:subPropertyOf, 
not rdf:type (or rdfs:subClass).

For what it's worth, in SMW 0.7 you could have a template {{weather 
effect|rain}} that inserts [[effect::weather| ]] as well as [[weather 
effect::{{{1}}}]].  That would save typing, but would not organize the 
factbox the way you want.

 > See http://www.tnlc.com/wiki/index.php?title=4x4_Evolution for an 
example of how
 > this becomes unruly with just a few relationships.

Yes, interesting.

Yours,
--
=S Page

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] SMW feedback, futures (was Unify relations and attributes?)

2007-08-13 Thread S Page
Eep² wrote:
 > OK, I added my response there ( 
http://ontoworld.org/wiki/Talk:N-ary_relations#Too_complicated.2Fconfusing_and_just_unnecessary
 
),
 > with more info and an example.

Most of your feedback isn't to do with N-ary relations or unification. 
I responded on that ontoworld page but here as well since more people 
read the mailing list than watch ontoworld pages.

> I know this thread is kind of old but I have some suggestions to
 > streamline this a bit. The relationships/attributes/properties
> (whatever) are too wordy.

Wiki editors decide; maybe those on ontoworld.org are long-winded ;-) . 
  Longer names tend to be more descriptive, and they read better when in 
the factbox and the Special:Browse.  E.g.
is president of   United States
reads better than
president   United States

> Instead, these are shorter and more grammatically correct, shorter,
 > less syllables, faster to type, etc:

If/when editing assistance arrives, longer names wouldn't hurt typing.

> has president -> president

Note that you have to distinguish "has president" from its inverse "is 
president of".  Likewise "is location of" versus "located in", etc.

> Also, with the new property, er, property (attribute? option? parameter?),
 > will it work like relationships do now with
> [[relationship::name]] where the "::" (double colons) create a link
 > where as [[attribute:=name]] doesn't create a link?

Markus Krötzsch proposed in 
http://www.mail-archive.com/[EMAIL PROTECTED]/msg00270.html 
that you always write [[property:=value]], and if the property is of 
Type:Wikipage it'll appear as a link to the page.  But that was back in 
March.

> I ask 
> because I need that functionality for both parameters ("relationship"
 > and "attribute" in SMW .7)

You can use templates to insert linked text together with attributes 
into Wiki pages.  Please can you give examples of when you would need to 
link an attribute value in factboxes and search results?
*  It doesn't make sense for most numbers.
*  Maybe parts of dates should turn into links, but that's arguably a 
bug -- SMW should respect MediaWiki's $wgUseDynamicDates setting.
*  Note that if your attribute is of Type:String and has Wikitext in it, 
the behavior is a little undefined, e.g.
   [[address:=Michael Jackson ''claims'' to still live at [[Neverland 
Ranch]] but has been seen in [[Las Vegas]] for months]]

It might be appropriate to have Type:String and Type:Wikitext.  And 
maybe the current hack of specifying a "unit" for dates and booleans 
could be replaced with a display format specifier for attributes that 
would let you say what parts become links.  For example, Wikipedia 
physical values sometimes display the power of 10 and the unit as links.

> Last, if "property" can also accept just "prop" that would would make
 > it easier to use (and type)--"rel" and "att" could be
> shortened forms of the current parameter names too.

I find I'm often typing property names and :: and :=, but very rarely do 
I type "Relation" or "Attribute".  If you really want you can edit 
getNamespaceArray in the language file.

Cheers,
--
=S Page

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] Postgresql Version and OWL?

2007-07-02 Thread S Page
Fernando Carpani - INCO wrote:
> Hello. I'm newbie in the list.
> 
> There are some Postgresql version? The current published version works 
> only with mysql, but we need work on Postgresql...

Not that I'm aware of.

The thread "Re: [Semediawiki-user] database install problem" 
http://www.mail-archive.com/[EMAIL PROTECTED]/msg00522.html

discusses a particular Postgres problem and possible workarounds. 
Nobody has provided code to support Postgres.


> I've been worked with 0.6... such version works with RDF, and can read 
> OWL files (beacause there are RDF...)

If you're referring to Special:Import ontology, it is  disabled in 0.7. 
  http://ontoworld.org/wiki/Help:Ontology_import mentions this and 
describes alternative RDF import scripts written in Python.

>  what happend with the OWL 
> constraints (some values, etc) in the current version?

I'm not sure what you mean.  SMW doesn't really apply or impose OWL or 
RDFS constraints.  It merely stores semantic properties of articles for 
display, query, and export.  Its own datatypes impose some restrictions, 
e.g. Type:Enumeration limits possible values.  And you can "import a 
vocabulary", see http://ontoworld.org/wiki/Help:Import_vocabulary , so 
that when SMW properties are exported as RDF, they will use the external 
vocabulary.  For example, http://ontoworld.org/wiki/Attribute:Name is 
exported in RDF as .

> There are some 
> development or plan to explote it?

Can you be more specific what you want?

--
=S Page

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] Translation of SMW to Spanish

2007-05-16 Thread S Page
Jesús Espino wrote:
> Here you have translation file of SMW to Spanish.
Ignore my earlier post, I'm insane.

I checked in your improved file.  ¡Muchas gracias!

--
=S Page

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] Ask parser function?

2007-05-16 Thread S Page
Jim Wilson wrote:
> Is there an equivalent to  but as a parser function?  Akin to {{#ask}}?

I don't think so.

What do you want to achieve?  Do you want to use the result of a query 
in a template?

--
=S Page

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] Translation of SMW to Spanish

2007-05-16 Thread S Page
Jesús Espino wrote:
> Here you have translation file of SMW to Spanish.

Sure, languages/SMW_LanguageEs.php

It has several untranslated strings and other "TODO"s, an updated file 
would be welcome.

http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/SemanticMediaWiki/languages/SMW_LanguageEs.php

--
=S Page

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] "Enumeration" type not working

2007-04-30 Thread S Page
Yaron Koren wrote:

> The nondeterministic order for the values might be an issue.

I just confirmed in my local copy using MySQL that the [[allows value]] 
special properties aren't necessarily stored or retrieved in the same 
order as they appear on the page.

> Though not a big one, I don't think.

Well it means you can't sort by an enumerated value in inline queries or 
query for values "greater" than some enumerated value.  For ordered 
enumerations like a bug severity that's a problem.

I filed http://bugzilla.wikimedia.org/show_bug.cgi?id=9750

--
=S

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] "Enumeration" type not working

2007-04-30 Thread S Page
Yaron Koren wrote:
> I set up SMW 0.7, along with MediaWiki 1.9.3, on Discourse DB
> yesterday. 
 > One issue is that the "Enumeration" type doesn't seem
> to be working.

Markus checked in a change of the special property's name from "Possible 
values" to "Allows value", and you now specify each value in a separate 
annotation.

> http://discoursedb.org/wiki/Attribute:Publication_type

I changed the name there and split out the permissible values, and now 
http://discoursedb.org/wiki/The_Boston_Globe seems to work.

I've updated various documentation pages on ontoworld.org with the new name.

 > is this feature even officially supported?

I assume it isn't going away.  Markus, what say you?  It's better now 
than before: multiple attributes avoids hitting string property length 
limit when there are many values for the enumeration.

I thought about separating each permissible value into a separate 
special property, my concerns were
a) database performance for multiple records, probably not a significant 
factor.
b) I wasn't sure that the order in which the database would retrieve the 
allowed values is guaranteed to match the order they appear on the page.



Now is as good a time as any to offer my apologies for not contributing 
to the 0.7 release.  :-(  I'm sorry and hope to do better.

--
=S Page

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] localized dates

2007-04-17 Thread S Page
Markus Krötzsch wrote:

> Yes, I think we should switch to MW's formatting methods, using the content 
> language.
> 
> S: could you make this happen easily, or would this be difficult?

I checked it in.

$mwDateTime = date('YmdHis', $time);
if ( abs($time - strtotime($date_part)) > 0.5) {
$user_val = $wgContLang->timeanddate($mwDateTime);
} else {
$user_val = $wgContLang->date($mwDateTime);
}

This makes dates in the factbox and inline queries display in the date 
and date+time format the user prefers.  I don't see the French names for 
months unless I change the site's $wgLanguageCode in LocalSettings.php.


You can still override this by specifying a strftime() format string in 
an inline query or in a [[main display unit:=]] special property for the 
attribute.  I could switch that customization to use MediaWiki's format 
strings (e.g. in a query
   [[date of birth:=*M d]]
instead of strftime()'s
   [[date of birth:=*%b %d]]
MediaWiki's format strings are based on PHP's date() format characters 
but the specifics aren't documented.

I'm not sure how MediaWiki handles preferences that change page text: 
does it cache different versions of the page for each locale+preference, 
or does it not cache variable text, or does variable text disable caching?


Another thing I have to figure out is what ought to happen on a site 
that enables dynamic dates (
   $wgUseDynamicDates = true;
, see http://meta.wikimedia.org/wiki/Help:Date_formatting_feature) so 
dates turn into a pair of day and year links as they do on 
wikipedia.org.  User:Patrick was trying to simulate this on 
ontoworld.org (which doesn't seem to have this feature enabled).

Sorry to ramble... sorry I'm not more expert on MW internals... sorry I 
keep apologizing :-)

--
=S Page

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] Image type class for SMW 0.6

2007-04-05 Thread S Page
cnit first wrote:
> It would be nice to have a Image datatype, whith should be rendered as
> a standard image link (with options) in result of search query.
> Currently, I've tried to combine [[Image:]] wikitext with inline 
> query for attribute that has a type of String and value of imagename,
> that didn't work.

People have come up with workarounds for parsing glitches like these 
involving templates and quoting.  In the fact box maybe you could use 
service links (http://ontoworld.org/wiki/Help:Service_links) to get a 
thumbnail.

There are some other ways you could represent images:

If the attribute value is a string containing the full wikitext for an 
image, e.g. [[Image:aifb.gif|left]], then SMW displays that image in 
text and in the factbox, but not in inline queries.  This is probably 
another case of bug 9334 
(http://bugzilla.wikimedia.org/show_bug.cgi?id=9334 ), that wikitext in 
inline queries is not parsed.

Or maybe the property should be a relation to the image's wikipage, e.g. 
[[Logo::Image:aifb.gif]].  But this just creates a wiki link to 
Image:Aifb.gif, rather than displaying the image.  Again, could be a 
parsing glitch.

I tried these out at http://ontoworld.org/wiki/Test_Image , take a look 
and please edit it to show what you're trying to do.


> If there's a possibility of image queries, please
> let me know.

As you and I've found, it's not too hard to add datatypes to SMW.  The 
ones so far arose from the defined XML Schema datatypes and some 
physical attributes like temperature that can't be represented by 
Type:Linear and custom units.  IMO, before adding another datatype it's 
better to first generalize existing SMW facilities such as service 
links, format strings, the special property [[possible values]], etc. to 
support neat ideas like images.  (If SMW has a datatype for images, why 
not media:, colors, etc?)

> Otherwise, I might consider trying to do that myself 

[and then you wrote it -- yowsah! ]
I found a couple of things trying to make your code work with latest SVN 
code:
* needs global $smwgContLang;
* $nt is undeclared in
$thumbhtml=$skin->makeKnownLinkObj($nt, $thumb->toHtml());
* getXSDType() returns http://www.w3.org/2001/XMLSchema#image , but 
there is no XML Schema datatype for images.  If you care about RDF 
export, perhaps you could make the XSD string the URL of the image and 
use the XSD type http://www.w3.org/2001/XMLSchema#anyURI

Anyway, well done!
--
=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


Re: [SMW-devel] localized dates

2007-04-05 Thread S Page
cnit wrote:
> Also I believe that localized translations (eg. SMW_LanguageRu.php and
> so on) should also provide a PHP-format string to correctly display
> local dates, according to their "uselang" variable.

Umm, can you be more specific as to what you want?  Are you talking 
about attributes of Type:Date?

The post 0.6 SMW code in Subversion and on ontoworld.org allows you to 
control date datatype display, using [[main display unit:=%d %b ]] in 
attribute pages and [[date of birth:=*%b %d]] in inline queries.  See 
e.g. http://ontoworld.org/wiki/Attribute:Birthday

That just relies on PHP's strftime() implementation to format the date. 
   PHP's strftime() is multilingual if you call setlocale() first, but I 
don't believe MediaWiki calls setlocale().  Instead it seems to have its 
own date formatting code in DateFormatter.php using its own localization 
strings.  Internally MediaWiki uses different format string syntax than 
strftime().

Would you like SMW to by default display attributes of Type:Date 
according to the user's date and time preference in My Preferences?

I'd rather not introduce a new way to display dates in addition to what 
MediaWiki provides, so maybe exposing ways to format dates with a 
non-localized strftime() was a mistake.


> My wiki project is multilangual and it uses three different values for
> uselang (to provide the localized menus and so on).

I'm curious how you do this.  If I set my language in My Preferences, I 
don't see localized SMW strings.  To see them I set $wgLanguageCode in 
LocalSettings.php.  Am I doing something wrong?

Thanks for your insight on these issues, it should help get localization 
right.

--
=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


Re: [SMW-devel] data types

2007-03-29 Thread S Page
> recently i noticed that in our wiki the data types are broken,

All or some?

> but i 
> found a similar case also at http://ontoworld.org/wiki/Type:Vector. Even 
> though the Type is defined (at least on the wiki page), it gives the 
> smw_unknowntype error.

SMW has built-in types that must be registered and implemented by PHP 
code but do not need a wiki page.  It also allows user-defined types 
like http://ontoworld.org/wiki/Type:Mass that must have a wiki page that 
specifies conversion factors for floating point values (the 
[[corresponds to:=2.204622 lb, lbs, pounds]] special properties). 
Anything else is an error, including proposals on ontoworld.org like 
Type:Vector.

> In general, the Types should be definded in 
> SMW_Datatypes.php and are processed over the TypeHandler at the 
> addRelation or addAttribute routine, right? Does anyone have an idea 
> where to dig for a solution?

What does Special:Types show?  If you add an attribute using one of the 
built-in types does it work?

--
=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


Re: [SMW-devel] test suite for SMW

2007-03-19 Thread S Page
S Page wrote:

> I mean to look at 
> http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/tests/

These use PHPunit, but it seems an old version, and they're for internal 
testing of particular classes, not testing pages with extensions.

MediaWiki also has maintenance/parserTests.php which is supposedly good 
for testing extensions.  But SMW breaks it because it introduces unknown 
tables.  I filed bug 9335, 
http://bugzilla.wikimedia.org/show_bug.cgi?id=9335 , which Rob Church 
made a dupe of existing bug 8010.

> and 
> http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/t/

This is old and incomplete.

> Meanwhile I think we should create some pages on ontoworld.org 

I started, http://ontoworld.org/wiki/Category:SMW_unit_tests
It's pretty rough.  It needs a [[Template:Unit test]] with
  input wiki text
  expected HTML output
  expected factbox output
  expected inline query output

and another [[Template:Test results]] to manually record PASS/FAIL/XFAIL 
for each release with nice green and red emoticons :-)

Template:SMWbug, Template:Bugged, and Attribute:Bugged are also useful.

Markus Krötzsch replied:
 > Agreed. There will be at least one developer in project Halo who will
 > investigate means of doing proper unit testing for SMW.

I hope this helps.

 > Concerning the interdependencies of code, I am constantly working on
 > disentangling this mess.

I don't think the code is a mess!  Extensions add features to MediaWiki, 
so naturally they call back into MediaWiki all over to get things done. 
  Restructuring the SMW code so that a core layer has no MediaWiki 
dependencies and an interface layer passes information between SMW and 
MediaWiki would probably make it harder to understand.

Regards,
--
=S

-
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


Re: [SMW-devel] Semi-automatic annotation of (a copy of) Wikipedia

2007-03-16 Thread S Page
Lukasz Bolikowski wrote:

> I have just started my PhD research on synchronizing knowledge
> between language versions of semantically-annotated Wikipedia
> (suggesting updates and corrections in individual versions based
> on the consensus knowledge).  One of the problems is to obtain
> (or create) semantic annotation in a couple of languages, ideally
> the four most popular ones on Wikipedia: English, German, French,
> and Polish.

I had the idea to translate facts relying on interlanguage links.

If each page has these, e.g. [[Attribute:Population density]] has
[[fr:Attribut:Densité de population]] and [[Relation:Surrounded by]] has 
[[fr:Relation:Entouré par]],
then you can perform machine translation of a page's facts from the 
language it was written in to another.  All you need is the 
interlanguage links for each article in the triple, the pages in other 
languages don't have to exist.

I wasn't able to get this to work well.  I modified 
SMW_SpecialExportRDF.php to translate a given page, but it wasn't a good 
framework and I didn't have many local pages with translations.  I 
couldn't figure out how to reuse the appearance of the factbox when I 
was providing the property values from database queries instead of the 
page creating them from wikitext parsing.  I didn't fully understand how 
MediaWiki's language selection and translation worked.

If this approach worked, you could use such a machine translator as a 
translation assistant to add facts to SMW pages in other languages.  I 
would use it simply to display what other languages currently think are 
the facts about a topic, e.g. Pope John Paul II in Polish or ski racers 
in Austrian.

 > Note that I don't want to agree on a common ontology, just on
 > the technical things.  I'd like to reproduce the chaos that
 > is likely to emerge when each Wikipedia starts the semantic
 > annotation on its own.  "Aligning" knowledge from multiple
 > not-entirely-compatible ontologies is a much more interesting
 > research problem.

Some people dream of having a corpus of facts expressed in a canonical 
language, that then get translated into each language on the fly.  I 
think there was a meta-wiki commons project to do something like this 
for page translations and category names; obviously you get disagreement 
as to canonical language, what facts if any are culturally neutral, etc.

I can send my SMW_SpecialTranslateFacts page code to anyone interested 
in bad code ;-) .  After getting the triples for attributes, relations, 
and special properties for a page (much like Special:ExportRDF), it 
translates each title in the triple by querying the MediaWiki 
'langlinks' table:

 $this->db = & wfGetDB( DB_MASTER );

 $this->lang_sql = 'll_lang=' . 
$this->db->addQuotes($this->language);

 $res = $export->db->select($export->db->tableName('langlinks'),
   'll_title',
   'll_from =' . 
$export->db->addQuotes($this->title_id) .
   ' AND ' . $export->lang_sql, 
'SMWTranslateFactsTitle::GetTranslatedTitle');

 while($row = $export->db->fetchObject($res)) {
 echo "Found translated title " . $row->ll_title . "\n";
 $this->title_translated = $row->ll_title;
 $this->has_translation = true;
 }
 $export->db->freeResult($res);

Regards,
--
=S

-
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


Re: [SMW-devel] [swikig] Translation to Polish + feature requests

2007-03-15 Thread S Page
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.  H.


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


Re: [SMW-devel] Help:Category page returns as empty because of || (bug 9178)

2007-03-08 Thread S Page
Thanks for your reply.
I tracked it down some more.  As I updated the bug, I think this broke 
in revision 17529 when normalizeRedirects() switched from working on 
article names to working on Title objects.  The function uses array_diff 
with an empty array, I think to remove duplicates, but this casts to 
string when comparing array entries, and this fails for MediaWiki's 
Title objects.

 > I will soon rewrite the Inline Query code to separate parsing
 > and query execution. If this does not fix the bug, it will at least 
make it
 > easier to track it down.

OK then.  I think the fix here is to rewrite this routine to work with 
an array of article_ids.


I have a general question: isn't
   $check_list = array_unique($list); // Copies the array without 
duplicate values

a better idiom than
   $check_list = array_diff( $list, array() ); // Copies the array

?

Regards,
--
=S


-
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


Re: [SMW-devel] New team member

2007-03-06 Thread S Page
Daniel M. Herzig wrote:
> Hello Everyone!
> 
> I would like to briefly introduce myself. My name is Daniel and I have just
> joined the SMW team at the AIFB to support Denny and Markus. 

Welcome!  Stop by my home office in San Francisco and say hi, it's just 
down the road from Saarbrücken  :-)


> Currently, I'm
> making myself familiar with the whole project and I am trying to grasp it.
Maybe we could have an architectural document somewhere.  I'm not sure 
if it would belong on mediawiki.org or ontoworld.org.

I wrote up stuff I learned at 
http://meta.wikimedia.org/wiki/Semantic_MediaWiki/Implementation , feel 
free to add to this.

> I
> wrote a few additional specialpages, which could show up in the next update.

What sort of things?  Are they in Subversion?

> If you see a piece of my sourcecode and have some comments. Please don't
> hesitate to send me some feedback! I would greatly appreciate it!

The same goes for me.  I've checked in changes to SMWDataValue handling 
and a  *poor* implementation of SMWEnumTypeHandler with the hope that 
someone would review them and provide suggestions...

I know of two ways for more formal code reviews on distributed projects:

A) Send patches around in e-mail, like Cairo, e.g.:
   http://lists.freedesktop.org/archives/cairo/2007-February/009725.html
   Subject: Re: [cairo-commit] 3 commits (nquartz -> quartz renaming)

or B) Attach patches to bug reports and invite review, like Mozilla, e.g.:
   https://bugzilla.mozilla.org/show_bug.cgi?id=369930#c12

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


[SMW-devel] test suite for SMW

2007-03-05 Thread S Page
We need a test suite, tout de suite!

E.g. http://bugzilla.wikimedia.org/show_bug.cgi?id=9178 , a feature 
stopped working recently

Or   http://bugzilla.wikimedia.org/show_bug.cgi?id=9129 , the proposed 
fix for this changes the way attributes with [[wiki links]] display, but 
we have no tests for how attributes with wiki markup punctuation 
currently work.

I mean to look at 
http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/tests/ and 
http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/t/ for ideas we 
can use.  But it may be impossible to run SMW files one-by-one outside 
MediaWiki due to all the interdependencies.

Meanwhile I think we should create some pages on ontoworld.org named 
Unit tests/relations, Unit tests/dates, Unit tests/inline queries, etc.
in [[Category:Unit tests]], and start filling them with
   'wiki text'  'should result in xxx'
   'wiki text2'  'should result in yyy'
etc.  There are existing test relations and test attributes in 
[[Category::Testpage]] we can use.

http://en.wikipedia.org/wiki/Unit_testing !
http://en.wikipedia.org/wiki/List_of_unit_testing_frameworks#PHP

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


[SMW-devel] Help:Category page returns as empty because of || (bug 9178)

2007-03-05 Thread S Page
http://ontoworld.org/wiki/Help:Category shows as blank.  No page 
contents at all.

But the page is there,
http://ontoworld.org/index.php?title=Help:Category&action=edit

I tracked it down to this query in the Union section,

instance of::continent||country

It's the double pipe for disjunction that triggers the blank page.  You 
can trigger it in Special:Ask, e.g.

http://ontoworld.org/wiki/Special:Ask?query=[[Born in::Dallas||Iceland]]

remove one of them and it works.

I filed bug 9178,
http://bugzilla.wikimedia.org/show_bug.cgi?id=9178


I might be able to look into this tonight (tomorrow in Germany).

--
=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


[SMW-devel] units in PhpWiki (was Re: patch: mass type support)

2007-03-04 Thread S Page
> Markus Krötzsch schrieb:
>> We are unsure yet how to build a unit 
>> conversion system that is more generic, and that can be internationalized. 

Reini Urban wrote:

> FYI: In PhpWiki I'm just using the external programm units 
> (/usr/bin/units and /usr/share/units.dat)
> which is detecting and converting most of the needed numbers with units 
> fine, gets the base unit and number (you call it "default unit"), and 
> has a huge database, which will most likely never be duplicated in php. 
> At least I hope so.

Yeah, UNIX units(1) is amazing.  I looked at your code and it seems you 
execute `units 963.66 km^2` and read the value and unit after 
"Definition:" in the program output.  Good idea!  Maybe this approach 
could be an option in SMW.

My Cygwin units program doesn't seem internationalized, though maybe 
someone has translated units.dat.

Is there more information about PhpWiki and its take on a semantic Wiki? 
  I installed PhpWiki from SourceForge, and got a few errors, so I'm not 
sure what results I should be seeing.  (Errors below.)

Good luck with your work!

--
=S Page

Appendix: my PhpWiki 1.3.13 errors.

The ongoing errors are:

Warning: "units: " (...repeated 6 times)
This is probably due to path issues on my Windows/cygwin/XAMPPLite system

Warning: 
"WikiPluginLoader::include_once(lib/plugin/SemanticRelations.php) [function.WikiPluginLoader-include-once]:
 
failed to open stream: No such file or directory"

This seems because SemanticRelations.php isn't present in 1.3.13.

During initial start of a virgin PhpWiki I saw the following error 
interspersed with page loading:

...
RelatedChanges
 from MIME file 
C:/xampplite/htdocs/phpwiki-1.3.13/pgsrc/RelatedChanges - New page - 
saved to database as version 1
Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to 
allocate 78471 bytes) in 
C:\xampplite\htdocs\phpwiki-1.3.13\lib\ziplib.php on line 870


I reloaded and saw:

...
Complete.

Return to HomePage

Warning: "units: " (...repeated 6 times)

Warning: 
"WikiPluginLoader::include_once(lib/plugin/SemanticRelations.php) [function.WikiPluginLoader-include-once]:
 
failed to open stream: No such file or directory"

-
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


[SMW-devel] performance check-in: avoid datavalue DB lookups (bug 8752), more to do

2007-02-12 Thread S Page
I changed SMW_DataValue.php to defer computing datavalue members 
desiredUnits, serviceLinks, and possibleValues until requested.

Without this, I verified that a simple inline query like [[Climate:=+]] 
makes five GetSpecialPropertyValues database queries for the special 
properties HAS_TYPE, MAIN_DISPLAY_UNIT, DISPLAY_UNIT, POSSIBLE_VALUES, 
and SERVICE_LINK, even though none is needed.

So I'm pretty confident it's a performance win and I checked it in to 
SVN.  It's working locally for me, I hope it doesn't break anything.


The inline query still makes a GetSpecialPropertyValues query for 
SERVICE_LINK, because newAttributeValue() for each result winds up 
calling the datatype's processValue() which adds service links whether 
or not they're not needed. SMWDataValue->setUserValue() and 
SMWDataType->processValue() need to be refactored so they do the minimum 
work necessary, and other methods get the additional information from a 
datavalue and datatype.  I filed bug 8961 for this.

--
=S

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] [Semediawiki-user] enum attribute type

2007-01-08 Thread S Page
(I switched follow-ups to semediawiki-devel as we're slinging code :-)_

 > the type pages is:
 > ...
 > [[Enum mapping:=Trivial=2]]
 > [[Enum mapping:=Enhancement=1]]

That's an interesting alternative approach to my
   [[possible values:=Enhancement,Trivial,...]]
Yours is more complex for users who may not care to pick offsets, but it 
is less likely to run into string length limits.
Maybe a middle way to is to make the number in [[Enum mapping]] optional.

It's interesting that you are saying enums are an integer with a string 
appearance and I'm saying an enum is a string with a numeric value.  I 
haven't had time to compare both versions (I'm starting to see why 
developers like a local repository and git features).

I did notice:
>function getXSDType() {
>return 'http://www.w3.org/2001/XMLSchema#' . $this->typeid;
>}

The user-defined typeid is not going to be one of the XML Schema 
Description datatypes.  Check the RDF Export of a page, I think you 
should export the string appearance and identify it as a XMLSchema#string.


Warmest 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


[SMW-devel] some commits to SVN

2006-12-05 Thread S Page
revision 18167: Fix for 
http://bugzilla.wikimedia.org/show_bug.cgi?id=7881 , use #anyURI as XSD 
Type for Type:URL

revision 18168: Reuse "unit" in inline queries to allow specifying a 
format for date/time.

revision 18173: Enhancement: implement a boolean attribute datatype.

revision 18174: Performance: call new smwfGetSpecialPropertyValues() 
instead of smwfGetSpecialProperties().

revision 18179: Support formatting booleans in inline queries.

The last one is similar to specifying a format in inline queries for 
date/time.  E.g.:
 
  [[HotOrNot:=+]]
  [[HotOrNot:=*√,x]]
 
will show either a "checkmark" (actually square root since [EMAIL PROTECTED] 
Windows 
XP doesn't render any of the Unicode tick mark glyphs) or an 'x' for 
true and false values of the boolean attribute HotOrNot.  This may help 
some ontoworld.org users to achieve what they seem to be trying to do 
with "feature tables".

As always, I welcome any criticism, or outright reversions!
--
=S

-
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


[SMW-devel] supporting date formats in inline queries (with patch)

2006-11-28 Thread S Page
I noticed in http://ontoworld.org/wiki/Date-related_tables that user 
Patrick is trying to display parts of a date.  For example, show Jul 6 
as birthday of G.W. Bush whose date of birth is 1946-07-06.

Inline queries allow passing a unit, e.g.
   [[mass:=*oz]]
will show masses in ounces instead of the primary unit (kg).

So I modified SMW_DT_DateTime.php to take this unit, but interpret it as 
  a date format string (SMW formats dates using strftime(), 
http://us2.php.net/manual/en/function.strftime.php ).  Thus


   [[date of birth:=+]]
   [[date of birth:=*%b %d]]


will show just the month and day part of a Type:Date in "Jul 6" format. 
  Pretty cool, though still not enough to derive astrological signs of 
the zodiac from Date of birth.  ;-)

Someone else has already noted that you can't ask for an attribute twice 
in one inline query with two different "units"; this would be nice so 
you could have parts of the date in separate columns so you can sort by 
time, or birthday, or year.  Has a bug been filed for this?

I currently can't check in to MediaWiki Subversion, but it's a simple 
patch (below).

--
=S


$ svn diff SMW_DT_DateTime.php | expand -4
Index: SMW_DT_DateTime.php
===
--- SMW_DT_DateTime.php (revision 17944)
+++ SMW_DT_DateTime.php (working copy)
@@ -39,6 +39,10 @@
  * @access public
  */
 function processValue($v,&$datavalue) {
+   // For a DateTime, "units" is really a format from an inline query
+   // rather than the units of a float.
+   $desiredUnits = $datavalue->getDesiredUnits();
+   //echo "DEBUG: in DateTimeHandler->processValue(), 
desiredUnits="; echo implode('|',$desiredUnits); echo "\n";
 $str_val = trim($v);
 $time = strtotime($str_val);
 if ($time == -1 || $time === false) {
@@ -50,22 +54,33 @@
 // so reformat back to ISO8601. Unfortunatelly, ISO in
 // general is not compatible with XSD; but it should work
 // for the restricted interval we currently support.
-   $str_val = strftime("%Y-%m-%d", $time);
-   $user_val = $str_val;
-   // See if there is a significant time component.
-   // TODO: what about TimeZone?!
-   if ( abs($time - strtotime($str_val)) > 0.5) {
-   $user_val .= strftime(" %H:%M:%S", $time);
+   $date_part = strftime("%Y-%m-%d", $time);
+   $str_val = $date_part . strftime("T%H:%M:%S", $time); // always 
show time in XSD
+   $datavalue->setProcessedValues($v, $str_val, $time);
+
+   // Determine the user-visible string.
+   if (count($desiredUnits) ==0) {
+   // The default user-visible string shows date, plus
+   // time of day separated by space if it's significant.
+   $user_val = $date_part;
+   // See if there is a significant time component.
+   // TODO: what about TimeZone?!
+   if ( abs($time - strtotime($str_val)) > 0.5) {
+   $user_val .= strftime(" %H:%M:%S", $time);
+   }
+   $datavalue->setPrintoutString($user_val);
+   } else {
+   // Print the date in all wanted formats (even if some of 
them would be equivalent -- we obey the user's wish)
+   foreach ($desiredUnits as $wantedFormat) {
+   $datavalue->setPrintoutString(strftime($wantedFormat, 
$time));
+   }
 }
-   $str_val .= strftime("T%H:%M:%S", $time); // always show time in XSD

-   $datavalue->setProcessedValues($v, $str_val, $time);
-   $datavalue->setPrintoutString($user_val);
 //smwfNumberFormat($time) . ' seconds since 1970' ;
 // do not show the seconds since 1970; showing a date in 
multiple calendar systems could be a future output enhancement (Roman, 
Gregorian, whatever calendar), if the date is "historical" enough

 $datavalue->addQuicksearchLink();
-   $datavalue->addServiceLinks($str_val); //possibly provide single 
alues (year, month, ...) in the future
+   $datavalue->addServiceLinks($str_val); //possibly provide single 
values (year, month, ...) in the future
 return;
 }

-
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


Re: [SMW-devel] SemanticWeb conference dates + deadlines als ical?

2006-11-26 Thread S Page
Joerg Diederich wrote:

> I just started to play around with google calendar and I really think
> it's useful. Now it would be great to have the usual conference dates
> + deadlines in it, too. Some people already have public calendars of
> events and deadline, but they are incomplete, badly maintained etc.
> 
> Now before I start yet another (incomplete + badly maintained)
> conference calendar, I thought it might be (easily) possible to
> generate the data from the ontoworld knowledge base. What do you
> think?

You want to convert the data shown in 
http://ontoworld.org/wiki/Upcoming_events into iCal or CSV format and 
then import into Google Calendar?

You could write PHP code for a special page that outputs the information 
in the right format.

It might be possible to write an inline query that outputs the 
appropriate format.  However, looking at 
http://tools.ietf.org/html/rfc2445#section-4.3.4 , it calls for dates in 
ISO 8601 basic format, e.g. DTSTART:19980118T23.  SMW's Type:Date 
accepts this, but it stores and outputs ISO 8601 extended format with 
dashes, thus 1998-01-18T23:00:00.  There isn't (currently) a way to ask 
SMW for other formats, or to request parts of a date.  By the way, parts 
of a date would be very useful to do derived date things like "born on 
this day" that User:Patrick has been trying.

Maybe write an external script that contacts the new Special:Ask page, 
queries for events and their Start date and End date, then parses the 
result and does some munging?

--
=S

-
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


Re: [SMW-devel] Boolean Attribute type

2006-10-13 Thread S Page
Markus Krötzsch wrote:
> I still have to be convinced that we need a Boolean type.
>   
SMWBooleanTypeHandler is only 60 lines of code.  I don't yet feel 
strongly about adding it because I haven't seen Wikipedia pages with an 
obvious Boolean property in them.  I'll make my patch available for 
Markus and others to evaluate.

> The reason is that instead of a Boolean type, you could simply use a 
> Category. 
> I.e. instead of [[HotOrNot:=true]] you would write [[Category:Hot]]. So why 
> does one need Booleans?
>   
a)  You care about RDF output, and want the boolean datatype:
http://www.w3.org/2001/XMLSchema#boolean";>false
rather than the more opaque:


b)  You really want to represent a boolean property.  Category:Hot and 
Category:NotHot don't imply a boolean value and its "opposite"; I think 
the closest you can get is to state an owl:disjointWith relation between 
them.

c)  It seems hard to do an inline query that displays one column for the 
category and its opposite.

d)  It's easier to write a template that assigns a value to a boolean 
attribute than one that categorizes to one category or its opposite.

> With Boolean, we might even get 
>
> [[Category:City]], [[is a::City]], and [[is City:=true]]
>   
And also a string attribute [[Geographic 
locus:=City/Town/Village/Suburb/...]]
Cleaning up a wiki is hard because humans have a large vocabulary; I 
don't think providing multiple semantics to express properties makes it 
significantly harder.

> In addition, Boolean might also look 
> somewhat strange when printed in the article: you don't write "His Hot-Or-Not 
> value is [[HotOrNot:=true]]".
>   
I write
Is he hot? [[HotOrNot:=no]]
and it looks fine.


> On the other hand, a more general "enum" datatype could be useful. E.g. you 
> could have an attribute "status" with possible values only 
> being "alpha", "beta", and "stable".
That's technically cool and I think fairly easy to implement!  If anyone 
wants enum, file an enhancement request!  I can see just a few benefits 
over a plain string datatype:
a) input validation -- you'd see
Status[Oops! "pre-release" is not an allowed value for  Status, 
it can only be one of "alpha", "beta", "stable"].
in the fact box. 
b) the enum values would have a sort order and support greater than/less 
than comparisons (by putting a sequence number in smw_attributes.value_num).

Regards,
--
=S

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] Idea: Export page properties like time of last edit as attributes

2006-10-08 Thread S Page
1. Export
=
Thomas Bleher wrote:
> I think it would be cool if SMW exported wiki page properties as
> attributes and relations.
>   
Plain MediaWiki's Special:Export exports the contributor and timestamp 
of the latest revision in XML.

If you were to enhance this, why not export them as Dublin Core metadata 
in RDF?  That's already a meaningful syntax for these properties.  
Another project has done this, "Wikipedia3", see e.g. 
http://labs.systemone.at/wikipedia3/samples.rdf
It was announced on the swikig mailing list 
(http://www.aifb.uni-karlsruhe.de/pipermail/swikig/2006-April/000167.html )
and Markus Krötzsch responded 
(http://www.aifb.uni-karlsruhe.de/pipermail/swikig/2006-April/000168.html ):

However, we thought about creating a 
meta-data complement of our RDF-export as well (where you have author, 
license, revision, etc. all in one place).

As Markus pointed out, SMW's Special:Export RDF currently exports the 
facts in the article, not facts about the article.  The two are 
separate; for example, [[last edited by::John Hancock] in the 
Declaration of Independence article is usually talking about the 
historic document, not about the Wiki page for it.
> I'm thinking of the following:
> Attributes:
>   Last edit at
>   Created at
>   Edit count
>   Page size
> Relations:
>   Created by
>   Edited by
>   Last edit by
> (I'm no native speaker, so maybe the names should be changed; I think
> the idea is clear)
>   

2. Querying
===
> This would allow a lot of useful things:
> * The front page could list newly created pages
> * Category pages could list newly created pages, the pages last edited
>   or the biggest and smallest pages
> * Users could get a list of pages they had edited or created, e.g.
>   [[Created by::Thomas]] [[Last edit by::*]] [[Last edit at:=*]]
>   
Ahh, you're not really asking for export of page properties *from* 
Semantic MediaWiki, you're asking for access to page properties *within* 
SMW.  That's different, but still an interesting idea.

Some page properties are already available as variables in Wiki text 
like {{REVISIONID}}, see 
http://meta.wikimedia.org/wiki/Help:Variable#Depending_on_page.  And the 
raw information is in the MediaWiki tables, primarily in the page and 
revision tables.

However, to do your useful things you want to query this information 
using the SMW inline query syntax, and the MediaWiki variables don't 
help.  Yes you might be able to do this as you propose: export page 
metadata information, then reimport it as special SMW relations and 
attributes.  It would be more direct if you abstracted the powerful 
inline query facility in SMW so that queries on certain special terms 
turn into database queries against other tables than the smw_attribute 
and smw_relation tables:
* Querying for your "Last edit by" would query against the revision table.
* Querying for "Has type", "Main display unit", "Imported from", etc. 
would query against the smw_specialprops table.
* If the Wikidata project takes off, querying against other special 
properties would query the appropriate dedicated Wikidata table.

Enhancing inline queries this way is worthwhile, but I imagine it will 
be hella hard to code!  Start at lines 477 and 523 in SMW_InlineQueries.php.

Best,
--
=S Page

> In short, with these attributes and relations, SMW can emulate many
> special pages, and make them more powerful and useful.
>
> Unfortunately, I don't currently have time to implement this, so I
> thought I'd post it here; maybe someone wants to code this up :-)
>
> What do you think about this idea?
>   


-
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


Re: [SMW-devel] Boolean Attribute type

2006-09-28 Thread S Page
I implemented Type:Boolean, complete with garbled fr and de translations.
It accepts true/false, 1/0, and language-specific strings.

Attribute:HotOrNot
[[has type::Type:Boolean]]


User:Skierpage
[[HotOrNot:=not]]


I'd check it in, but the public key I sent Markus and Denny for 
skierpage isn't accepted at svn.wikimedia.org.  Can someone set this up, 
or does someone want to accept a patch from me?

Here is my id_dsa.pub:

ssh-dss 
B3NzaC1kc3MAAACBAP1/U4EddRIpUt9KnC7s5Of2EbdSPO9EAMMeP4C2USZpRV1AIlH7WT2NWPq/xfW6MPbLm1Vs14E7gB00b/JmYLdrmVClpJ+f6AR7ECLCT7up1/63xhv4O1fnxqimFQ8E+4P208UewwI1VBNaFpEy9nXzrith1yrv8iIDGZ3RSAHHFQCXYFCPFSMLzLKSuYKi64QL8Fgc9QAAAIEA9+GghdabPd7LvKtcNrhXuXmUr7v6OuqC+VdMCz0HgmdRWVeOutRZT+ZxBxCBgLRJFnEj6EwoFhO3zwkyjMim4TwWeotUfI0o4KOuHiuzpnWRbqN/C/ohNWLx+2J6ASQ7zKTxvqhRkImog9/hWuWfBpKLZl6Ae1UlZAFMO/7PSSoAAACBAJF3E1jf7QDrrk4HwKwjTSwihlb1CNEM9os7IY7Hfp1LZynCeDMCU2NOU+J/rs8ai+TH5cp/w0NQaGk1iVAx95m+QdmOJO+wnHEZPxvnOqOZhOQSUVjKpRD8nCuJWlp5VYMVx4cfwCKYLu3mCdINIbgBQLJQmiIm2nbHGmQaeTlD
 
DSA-1024

--
=S

-
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