blob: 1108a6f486bd8c02ba9da7fecca31deab86fda39 [file] [log] [blame]
Till Westmannfd733ee2014-07-10 00:57:37 -07001use dataverse TinySocial;
2
3set simfunction "jaccard";
4set simthreshold "0.3";
5
6for $msg in dataset MugshotMessages
7let $msgsSimilarTags := (
8 for $m2 in dataset MugshotMessages
9 where $m2.tags ~= $msg.tags
10 and $m2.message-id != $msg.message-id
11 return $m2.message
12 )
13where count($msgsSimilarTags) > 0
14order by count($msgsSimilarTags)
15limit 10
16return {
17 "message" : $msg.message,
18 "similarly tagged" : $msgsSimilarTags
19};