[Popcon-developers] libpkg / libupt / libept gets popcon support
Enrico Zini
enrico at enricozini.org
Fri Jun 1 16:41:30 UTC 2007
Hello,
the name of the new library is still in flux, and maybe it'll end up
with the name 'libept' and replacing the libept we have now.
But in the meantime, name or no name, I implemented access to popcon
information (!)
It works like this:
1. Download http://popcon.debian.org/all-popcon-results.txt.gz and put
it either in ~/.popcon/ or in /var/lib/popcon/
2. When instantiating the Popcon data provider, if it sees that
all-popcon-results.txt.gz is new, it reads it, recomputes the scores
and rebuilds the index.
The index works like the debtags index: it's built in /var/lib/popcon if
it's writable, or in ~/.popcon/ otherwise.
Ideally there should be a 'popcon' commandline tool that does the
download and reindexing, like we now have "debtags update".
The Popcon data provider is now very basic: given a package name, it
gives a float value computed as an aggregated score of the various
popcon values. The higher the value, the higher is the popularity.
In the next days I intend to implement reading
/var/log/popularity-contest and computing something more interesting,
like TFIDF scores of installed packages.
The aggregated score is computed with this (rather arbitrary) weighted
sum:
score = vote + recent * 0.5 + old * 0.3 + nofiles * 0.1
Ciao,
Enrico
--
GPG key: 1024D/797EBFAB 2000-12-05 Enrico Zini <enrico at debian.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 307 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/popcon-developers/attachments/20070601/f6900df4/attachment.pgp
More information about the Popcon-developers
mailing list