blob: 1108a6f486bd8c02ba9da7fecca31deab86fda39 [file] [log] [blame]
use dataverse TinySocial;
set simfunction "jaccard";
set simthreshold "0.3";
for $msg in dataset MugshotMessages
let $msgsSimilarTags := (
for $m2 in dataset MugshotMessages
where $m2.tags ~= $msg.tags
and $m2.message-id != $msg.message-id
return $m2.message
)
where count($msgsSimilarTags) > 0
order by count($msgsSimilarTags)
limit 10
return {
"message" : $msg.message,
"similarly tagged" : $msgsSimilarTags
};