Semantic Search Engine
Given a query, return applications from the Aptoide Mobile Application Dataset.
The search engine leverages RoBERTapp in a bi-encoder architecture:
The textual fields of the applications were encoded and index offline. At run-time, the query is encoded, and the representations are compared.
The model considers the name and description textual fields for retrieval, which can be given different weights.
Endpoint
https://apprecommender.caixamagica.pt/api/search
Parameters
query
- A query for which applications will be retrieved.- For example social networks
n
- Number of applications to return- Default value: 5
w_name
- Weight given to the name textual field within the retriever.- Default value: 0.5
w_description
- Weight given to the description textual field within the retriever.- Default value: 0.5
Returns
JSON with the following fields:
-
status
- 'ok'
- 'nok'
-
data
- if status is 'ok', returns a list of ids of applications.
- The Aptoide Mobile Application Dataset can be used to get more information for each id.
Example
import requests
endpoint = "https://apprecommender.caixamagica.pt/api/search"
params = {'query': "social networks" , 'n': 5,
'w_name':0.5, 'w_description': 0.5}
r = requests.get(endpoint, params = params)
print(r.json())
Output:
{'status': 'ok', 'data': [56965434, 56966709, 56970406, 56970650, 56490993]}
The Aptoide Mobile Application Dataset can be used to get information for the returned ids. For instance, using the API:
import requests
endpoint = "https://apprecommender.caixamagica.pt/api/appsdataset"
for app_id in [56965434, 56966709, 56970406, 56970650, 56490993]:
params = {'app_id': app_id}
r = requests.get(endpoint, params = params)
print(r.json()['data']['name'])
Output
Facebook
WhatsApp Messenger
Instagram
Messenger - Text and Video Chat for Free
Twitter