How to deploy LBSMA
In order to execute them, you should:
Download the LarKC platform 2.5
Copy all the plug-ins (available here) to the LarKC plugin folder
Download and copy the files model.bin and annotated_matrix.bin available here to a folder you like
- Run LarKC
Get the workflow description, adjust the following parameters with the path to the file you downloaded at point 3
- _:sunsParam suns:modelPath "/home/dani/lbsma-data/model/model.bin" .
- _:sunsParam suns:predictInputPath "/home/dani/lbsma-data/model/annotated_matrix.bin" .
- Register the workflow in LarKC
Then you can execute the workflow submitting the following query:
PREFIX ns: <http://www.saltlux.com/geospatial#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>
PREFIX f: <http://www.saltlux.com/geo/functions#>
PREFIX twd: <http://www.saltlux.com/larkc/lbsma/twitterdata#>
PREFIX sioc: <http://rdfs.org/sioc/ns#>
SELECT ?poi ?name ?category ?p
WHERE {
ns:place_201 a ns:NamedPlace ;
geo:lat ?givenLat ;
geo:long ?givenLong ;
ns:category ?category .
?poi a ns:NamedPlace ;
ns:name ?name ;
geo:lat ?lat ;
geo:long ?long ;
ns:category ?category .
FILTER (?poi != ns:place_201)
FILTER (
(?lat - ?givenLat) < 0.001 &&
(?lat - ?givenLat) > -0.001 &&
(?long - ?givenLong) < 0.001 &&
(?long - ?givenLong) > -0.001
)
{ twd:108512266 sioc:creator_of ?tweet .
?tweet twd:talksAboutPositively ?poi .
# WITH PROBABILITY ?p
# ENSURE PROBABILITY [0.5..1)
}
}
ORDER BY DESC(?p)In the query you can modify the id of the user, in the triple:
twd:108512266 sioc:creator_of ?tweet .
