Re: [SMW-devel] Rating system

2014-05-16 Thread Argbert
Hi,

 

I might be wrong, but I think 
http://www.mediawiki.org/wiki/Extension:SemanticComments stores comments and 
ratings on separate pages in another namespace – this could help you out. Works 
on my SMW 1.8, but I am not sure whether I had to do little adjustments for the 
version.

 

Kind regards

 

 

Argi

 

Von: Benjamin Pelletier [mailto:bjpcalt...@gmail.com] 
Gesendet: Freitag, 16. Mai 2014 04:48
An: Semantic MediaWiki developers
Betreff: [SMW-devel] Rating system

 

I have a Semantic MediaWiki installation   that has a 
large number of Canyon pages  , 
where each of those pages describes a different hiking trip.  These pages 
  have a number of properties on 
them, one of them being Quality (how "good" of a trip it is).  Currently, 
editors can edit the wikitext to change this property.  I would like make a 
feature that allows people to vote on what Quality they think a particular 
Canyon is, and then the overall Quality (based on the votes received) would be 
displayed on the page.  I can think of a few different ways this might be done, 
but I was hoping to get some advice from people who are really familiar with 
Semantic MediaWiki for which method is likely to produce the best results with 
the least effort.

 

== Single "Voting data" wiki page ==

I could make an extension that automatically edits a particular wiki page 
(perhaps "Voting data") in response to a click.  It would read the existing 
content, add the new vote, recalculate ratings, generate semantic properties 
with those ratings, and save the new page version.  I'm not sure if this is 
possible, but it seems like the best solution if it is.  Although, there might 
be a problem eventually if, say, 300 people each vote on 10 canyons, then my 
page size is going to be like 60k (which may cause performance issues?)

 

== Stand-alone widget ==

I could make an extension that injects custom PHP that talks to an entirely 
separate (non-MediaWiki) database to store and report the voting data.  This 
same approach would work on any website, even if it wasn't a MediaWiki install. 
 The down side of this approach is that I have no idea how I would (could?) 
integrate the voting results into a semantic search.  Can semantic data be 
stored stably in the SMW database without being defined in any wikitext?

 

== Per-page voting data ==

I could maybe make an extension that automatically edits the current page and 
injects an additional vote line so all the quality votes for a given page are 
stored on that page.  But, this seems like the most difficult option, and there 
would be a bunch of voting data junk in the wikitext content.

 

Any suggestions?

 

Thanks!

--Ben

 

 

--
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] Rating system

2014-05-16 Thread Yaron Koren
Hi Ben,

It's not clear to me that this would require any development work. It seems
to me that you could have an approach like the following:

- Have a separate page for each vote; it could be structured as a subpage
of the user page, or a subpage of the canyon page, or something else - so
it could be called "User:Joe User/Big Canyon rating", or "Big Canyon/Joe
User rating", or "Rating of Joe User for Big Canyon" or some such.

- Each such page would hold a template with a single field, representing
the rating number. The user and canyon wouldn't have to be stored on the
page, because the template could extract those from the page title. The
template would store all three values (canyon, user, rating) as semantic
values.

- On each canyon page, the template would display the average rating for
that canyon, using a semantic query (with the "average" format), and might
also show the number of votes (using "count"). It would then have a link to
a popup form, to let the current user either submit a new rating (if they
haven't voted already) or change their rating. You could do that using
#formlink, plus the {{CURRENTUSER}} variable from the MyVariables extension.

- The ratings input within the popup form, and the average rating display,
could both be done using the familiar "stars" interface, using the Semantic
Rating extension (https://www.mediawiki.org/wiki/Extension:Semantic_Rating)

This whole thing is somewhat of a hack (a new page for every rating), but
maybe not that bad. Of course, it means that users can change each others'
ratings, which is not ideal, but then again malicious users can cause all
sorts of mischief within a wiki, if they want to - there are already ways
of dealing with that.

-Yaron


On Thu, May 15, 2014 at 10:47 PM, Benjamin Pelletier
wrote:

> I have a Semantic MediaWiki installation  that has
> a large number of Canyon 
> pages,
> where each of those pages describes a different hiking trip.  These 
> pageshave a number of properties 
> on them, one of them being Quality (how "good"
> of a trip it is).  Currently, editors can edit the wikitext to change this
> property.  I would like make a feature that allows people to vote on what
> Quality they think a particular Canyon is, and then the overall Quality
> (based on the votes received) would be displayed on the page.  I can think
> of a few different ways this might be done, but I was hoping to get some
> advice from people who are really familiar with Semantic MediaWiki for
> which method is likely to produce the best results with the least effort.
>
> == Single "Voting data" wiki page ==
> I could make an extension that automatically edits a particular wiki page
> (perhaps "Voting data") in response to a click.  It would read the existing
> content, add the new vote, recalculate ratings, generate semantic
> properties with those ratings, and save the new page version.  I'm not sure
> if this is possible, but it seems like the best solution if it is.
>  Although, there might be a problem eventually if, say, 300 people each
> vote on 10 canyons, then my page size is going to be like 60k (which may
> cause performance issues?)
>
> == Stand-alone widget ==
> I could make an extension that injects custom PHP that talks to an
> entirely separate (non-MediaWiki) database to store and report the voting
> data.  This same approach would work on any website, even if it wasn't a
> MediaWiki install.  The down side of this approach is that I have no idea
> how I would (could?) integrate the voting results into a semantic search.
>  Can semantic data be stored stably in the SMW database without being
> defined in any wikitext?
>
> == Per-page voting data ==
> I could maybe make an extension that automatically edits the current page
> and injects an additional vote line so all the quality votes for a given
> page are stored on that page.  But, this seems like the most difficult
> option, and there would be a bunch of voting data junk in the wikitext
> content.
>
> Any suggestions?
>
> Thanks!
> --Ben
>
>
>
>
> --
> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
> Instantly run your Selenium tests across 300+ browser/OS combos.
> Get unparalleled scalability from the best Selenium testing platform
> available
> Simple to use. Nothing to install. Get started now for free."
> http://p.sf.net/sfu/SauceLabs
> ___
> Semediawiki-devel mailing list
> Semediawiki-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
>
>


-- 
WikiWorks · MediaWiki Consulting · http://wikiworks.com
--
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium te

Re: [SMW-devel] Rating system

2014-05-16 Thread planetenxin
Hi Ben,

are you aware of this discussion: 
https://semantic-mediawiki.org/wiki/User:Yury_Katkov/s13n_stands_for_semantification

/Alexander

Am 16.05.2014 04:47, schrieb Benjamin Pelletier:
> I have a Semantic MediaWiki installation  that has
> a large number of Canyon pages
> , where each of those
> pages describes a different hiking trip. These pages
>  have a number of
> properties on them, one of them being Quality (how "good" of a trip it
> is).  Currently, editors can edit the wikitext to change this property.
>   I would like make a feature that allows people to vote on what Quality
> they think a particular Canyon is, and then the overall Quality (based
> on the votes received) would be displayed on the page.  I can think of a
> few different ways this might be done, but I was hoping to get some
> advice from people who are really familiar with Semantic MediaWiki for
> which method is likely to produce the best results with the least effort.
>
> == Single "Voting data" wiki page ==
> I could make an extension that automatically edits a particular wiki
> page (perhaps "Voting data") in response to a click.  It would read the
> existing content, add the new vote, recalculate ratings, generate
> semantic properties with those ratings, and save the new page version.
>   I'm not sure if this is possible, but it seems like the best solution
> if it is.  Although, there might be a problem eventually if, say, 300
> people each vote on 10 canyons, then my page size is going to be like
> 60k (which may cause performance issues?)
>
> == Stand-alone widget ==
> I could make an extension that injects custom PHP that talks to an
> entirely separate (non-MediaWiki) database to store and report the
> voting data.  This same approach would work on any website, even if it
> wasn't a MediaWiki install.  The down side of this approach is that I
> have no idea how I would (could?) integrate the voting results into a
> semantic search.  Can semantic data be stored stably in the SMW database
> without being defined in any wikitext?
>
> == Per-page voting data ==
> I could maybe make an extension that automatically edits the current
> page and injects an additional vote line so all the quality votes for a
> given page are stored on that page.  But, this seems like the most
> difficult option, and there would be a bunch of voting data junk in the
> wikitext content.
>
> Any suggestions?
>
> Thanks!
> --Ben
>
>
>
>
> --
> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
> Instantly run your Selenium tests across 300+ browser/OS combos.
> Get unparalleled scalability from the best Selenium testing platform available
> Simple to use. Nothing to install. Get started now for free."
> http://p.sf.net/sfu/SauceLabs
>
>
>
> ___
> Semediawiki-devel mailing list
> Semediawiki-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


-- 

semantic::apps by gesinn.it
Business Applications with Semantic Mediawiki.
http://semantic-apps.com

--
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel