cogProvides a list of recommended pages based on the pages content
TypeXAR
CategoryApplication
Developed by

Yann Flory

Rating
Rate!
0 Votes
LicenseGNU Lesser General Public License 2.1
Installable with the Extension Manager

Description

https://raw.githubusercontent.com/xwiki-labs/xwiki-labs-logo/master/projects/xwikilabs/xwikilabsproject.png

This is an extension of the Recommendations Application. It adds a new type of recommendations, based on the content of the pages, to that application.
Although you can use the core Recommendations Application without programming right, you need programming rights to use the Content Recommendations extension. You won't be able to receive the content-based recommendations without these programming rights.

Installation

Configure the core application

This extension use the core Recommendations Application. Thus, if you haven't done that before, you need to follow the installation instructions for that application.

Configure easyrec to have content-based recommendations

On the tenant page in the easyrec administration (Administration > Tenant > Configure tenant), you can edit the "profile_similarity" association type in order to be able to receive content-based recommendations. To do so, you have to select the ProfileSimilarity plugin and change the Duke Configuration in its settings :

easyrecTenantConfig.png

easyrecSimilaritiesConfig.png

Example of Duke configuration to use :

<duke>
 <param name="database-implementation" value="in-memory"/>
 <schema>
   <threshold>0.55</threshold>
   <property>
     <name>title</name>
     <comparator>no.priv.garshol.duke.comparators.Levenshtein</comparator>
     <low>0.2</low>
     <high>0.7</high>
   </property>
   <property>
     <name>content</name>
     <comparator>no.priv.garshol.duke.comparators.QGramComparator</comparator>
     <low>0.2</low>
     <high>0.9</high>
   </property>
   <property>
     <name>tags</name>
     <comparator>no.priv.garshol.duke.comparators.QGramComparator</comparator>
     <low>0.5</low>
     <high>0.6</high>
   </property>
   <property>
     <name>author</name>
     <comparator>no.priv.garshol.duke.comparators.ExactComparator</comparator>
     <low>0.4</low>
     <high>0.65</high>
   </property>
   <property>
     <name>space</name>
     <comparator>no.priv.garshol.duke.comparators.ExactComparator</comparator>
     <low>0.3</low>
     <high>0.7</high>
   </property>
 </schema>
</duke>

When 2 profiles (PageA and PageB) are compared, their five properties are compared. The Duke configuration example indicates that when the titles are completely differents, they have a score of 0.2, and when they are exactly the same, they have a score of 0.7. The contents give a score between 0.2 and 0.9, which indicates that 2 pages with the same content are more interesting than 2 pages wiht the same title. The tag property have a high "low score", 0.5, because 2 pages can have a similar content even if their tags are completely different.
When the 5 scores are computed, if their average is above the threshold (0.55 here), PageA will be recommended for users visiting PageB, and PageB will be recommended in the PageA panel.

Send profile of your existing pages to have content-based recommendations

If you have set up the Profile Similarity plugin as described above, easyrec will receive data about your pages' content and metadata (the pages' profile) each time a page is edited by a user. However, it won't automatically receive data about existing pages of your wiki, thus you have to send the profiles "manually". 

To do so, first you can add a list of "Blacklisted spaces" in the extension configuration in XWiki. They are spaces whose pages won't be part of the content-based recommendations.

The "profile similarity" plugin compute a similarity value between each pair of pages which have a profile. The computation time increases exponentially with the number of pages it has to treat so it is recommended to blacklist every spaces which contain only technical pages without relevant content (like "RecommendationsCode").
NB: all hidden pages are blacklisted.

Then, you can use the page "RecommendationsCode.SendProfile" which sends profiles to the recommendation engine one page at a time. Once a profile is sent, the script go to the next one. You can choose the number of pages you want to treat, and you can specify the index where to start, which is useful if you want to stop the sending and start it again later without having to do it from the beginning.

SendProfiles.png

Finally, you can enable the daily job to update the profiles of your pages whenever a page is created or edited in your wiki. To do so you can use the Job Scheduler page (Scheduler.WebHome), or the application installation page (RecommendationsCode.Installation)

Recommendations in a wiki farm

As for the core application, the Content Recommendations extension can be used in a wiki farm. If you have chosen to use the configuration of the main wiki in all your farm, the form to enable/disable the content-based recommendation, the blacklisted spaces and the easyrec http address will have the same value in all your subwikis.
However, you will have to send and update the profiles of your pages in each wiki manually (RecommendationsPage.SendProfile to send the profiles of existing pages and Scheduler.WebHome to updates the profile, as explained above).

Prerequisites & Installation Instructions

We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager). Note that installing Extensions when being offline is currently not supported and you'd need to use some complex manual method.

You can also use the following manual method, which is useful if this extension cannot be installed with the Extension Manager or if you're using an old version of XWiki that doesn't have the Extension Manager:

  1. Log in the wiki with a user having Administration rights
  2. Go to the Administration page and select the Import category
  3. Follow the on-screen instructions to upload the downloaded XAR
  4. Click on the uploaded XAR and follow the instructions
  5. You'll also need to install all dependent Extensions that are not already installed in your wiki

Dependencies

Dependencies for this extension (yannflory:contentrecommendationsapplication 0.12):

Tags:
Created by Yann Flory on 2015/07/30 13:36
    

Get Connected