Calculating attention with Midgard

cover image for Calculating attention with Midgard

APML Last week I was pondering how to add attention profiling support to the Midgard framework, and now it is there. Midgard is able to gather user’s interests and attention from multiple sources:

What remains to be seen is how this will be used to make websites smarter and more useful to people. In any case, for the developer using attention profile information is now trivial:

// Load the attention profiling library
$_MIDCOM->load_library('net.nemein.attention');

// Instantiate attention calculator for current user's default attention profile
$calculator = new net_nemein_attention_calculator();

// Get attention score for an article
$score = $calculator->rate_object($article);

Attention score is a decimal number between 1 and -1, where 0 is "neutral attention".

Coming up: APML profiles for active maemo.org users.

Technorati Tags: apml, attention, midgard, php


Read more Midgard posts.