Added plpythonu interface for ranking algorithm (#141)