new language| show rules| new rule| help
switch to:
Debug


1
Matches:
%emails% from %date%
%emails% %date%
Matchtypes:
emails
Type:
function
Content:
return query_build(
 	vars.emails, 
 	prefix("dc:", "http://purl.org/dc/elements/1.1/"), 
	where("?email", "dc:date", "?date"),
	filter("regex(?date, '" .. vars.date .. "')")
	)
Match Function Type:
Match Function:
2
Matches:
mail
emails
email
Matchtypes:
emails
Type:
function
Content:
return query_build(
 	prefix("email:","http://simile.mit.edu/2005/06/ontologies/email#"),
 	prefix("dc:",	"http://purl.org/dc/elements/1.1/"),
 	prefix("rdfs:",	"http://www.w3.org/2000/01/rdf-schema#"),
 	prefix("rdf:", "http://www.w3.org/1999/02/22-rdf-syntax-ns#"),
 	select("?name", "?from", "?subject", "?date", "?email"),
 	where("?email", "email:subject", "?subject"),
	where("?email", "email:from", "?from"),
	where("?from", "rdfs:label", "?name"),
	filter("(!regex(?name, 'zach dwiel', 'i'))"),
	where("?email", "dc:date", "?date"),
	orderby("DESC", "?date"),
	limit(20),
	stylesheet("/english/multiple-email.xsl")
)
Match Function Type:
Match Function:
3
Matches:
most recent %number% %emails%
recent %number% %emails%
%number% most recent %emails%
%number% recent %emails%
Matchtypes:
emails
Type:
function
Content:
return query_build(
 	vars.emails, 
	limit(vars.number)
	)
Match Function Type:
Match Function:
4
Matches:
today
Matchtypes:
date
Type:
function
Content:
-- return os.date("%Y-%m-%d")
return os.date("%Y-%m-%d", 1191851000)
Match Function Type:
Match Function:
5
Matches:
yesterday
Matchtypes:
date
Type:
function
Content:
-- return os.date("%Y-%m-%d", os.time() - 86400)
return os.date("%Y-%m-%d", 1191851000 - 86400)
Match Function Type:
Match Function:
6
Matches:
%number% day
%number% day old
%number% days ago
%number% day ago
%number% days old
%number% days
Matchtypes:
date
Type:
function
Content:
-- return os.date("%Y-%m-%d", os.time() - 86400 * tonumber(vars.number))
return os.date("%Y-%m-%d", 1191851000 - 86400 * tonumber(vars.number))
Match Function Type:
Match Function:
7
Matches:
one
Matchtypes:
single digit number
number
Type:
data
Content:
1
Match Function Type:
Match Function:
8
Matches:
two
Matchtypes:
single digit number
number
Type:
data
Content:
2
Match Function Type:
Match Function:
9
Matches:
three
Matchtypes:
number
single digit number
Type:
data
Content:
3
Match Function Type:
Match Function:
10
Matches:
four
Matchtypes:
number
single digit number
Type:
data
Content:
4
Match Function Type:
Match Function:
11
Matches:
five
Matchtypes:
number
single digit number
Type:
data
Content:
5
Match Function Type:
Match Function:
12
Matches:
six
Matchtypes:
number
single digit number
Type:
data
Content:
6
Match Function Type:
Match Function:
13
Matches:
seven
Matchtypes:
number
single digit number
Type:
data
Content:
7
Match Function Type:
Match Function:
14
Matches:
eight
Matchtypes:
number
single digit number
Type:
data
Content:
8
Match Function Type:
Match Function:
15
Matches:
nine
Matchtypes:
number
single digit number
Type:
data
Content:
9
Match Function Type:
Match Function:
16
Matches:
ten
Matchtypes:
number
Type:
data
Content:
10
Match Function Type:
Match Function:
17
Matches:
eleven
Matchtypes:
number
Type:
data
Content:
11
Match Function Type:
Match Function:
18
Matches:
twelve
Matchtypes:
number
Type:
data
Content:
12
Match Function Type:
Match Function:
19
Matches:
thirteen
Matchtypes:
number
Type:
data
Content:
13
Match Function Type:
Match Function:
20
Matches:
fourteen
Matchtypes:
number
Type:
data
Content:
14
Match Function Type:
Match Function:
21
Matches:
fifteen
Matchtypes:
number
Type:
data
Content:
15
Match Function Type:
Match Function:
22
Matches:
sixteen
Matchtypes:
number
Type:
data
Content:
16
Match Function Type:
Match Function:
23
Matches:
seventeen
Matchtypes:
number
Type:
data
Content:
17
Match Function Type:
Match Function:
24
Matches:
eighteen
Matchtypes:
number
Type:
data
Content:
18
Match Function Type:
Match Function:
25
Matches:
nineteen
Matchtypes:
number
Type:
data
Content:
19
Match Function Type:
Match Function:
26
Matches:
twenty
Matchtypes:
number
tens place number
Type:
data
Content:
20
Match Function Type:
Match Function:
43
Matches:
sixty
Matchtypes:
number
tens place number
Type:
data
Content:
60
Match Function Type:
Match Function:
42
Matches:
fifty
Matchtypes:
number
tens place number
Type:
data
Content:
50
Match Function Type:
Match Function:
40
Matches:
thirty
Matchtypes:
number
tens place number
Type:
data
Content:
30
Match Function Type:
Match Function:
41
Matches:
fourty
Matchtypes:
number
tens place number
Type:
data
Content:
40
Match Function Type:
Match Function:
36
Matches:
%single digit number%
%tens place number%-%single digit number%
%tens place number% %single digit number%
%tens place number%
Matchtypes:
two digit number
number
Type:
function
Content:
if vars['tens place number'] == nil then
    return vars['single digit number']
elseif vars['single digit number'] == nil then
    return vars['tens place number']
else
    return vars['tens place number'] + vars['single digit number']
end
Match Function Type:
Match Function:
39
Matches:
the %date%
Matchtypes:
date
Type:
function
Content:
return vars.date
Match Function Type:
Match Function:
44
Matches:
seventy
Matchtypes:
number
tens place number
Type:
data
Content:
70
Match Function Type:
Match Function:
45
Matches:
eighty
Matchtypes:
number
tens place number
Type:
data
Content:
80
Match Function Type:
Match Function:
46
Matches:
ninety
Matchtypes:
number
tens place number
Type:
data
Content:
90
Match Function Type:
Match Function:
47
Matches:
%_number%
Matchtypes:
number
Type:
function
Content:
return tonumber(vars.number)
Match Function Type:
function
Match Function:
return tonumber(vars.number) ~= nil
49
Matches:
%number:x% + %number:y%
%number:x%+%number:y%
%number:x% +%number:y%
%number:x%+ %number:y%
Matchtypes:
number
Type:
function
Content:
return x + y
Match Function Type:
Match Function:
50
Matches:
%_email address:str%
Matchtypes:
email address
Type:
function
Content:
return vars.str
Match Function Type:
function
Match Function:
return vars.str:match("^[%w_%.-]+@[%w_%.-]+$")
51
Matches:
%emails% from %email address:addr%
%emails% %email address:addr%
Matchtypes:
emails
Type:
function
Content:
return query_build(
 	vars.emails, 
 	prefix("email:","http://simile.mit.edu/2005/06/ontologies/email#"),
	where("?email", "email:from", "?from"),
	filter("regex(str(?from), '" .. vars.addr .. "')")
	)
Match Function Type:
Match Function:
52
Matches:
%emails% from %person:name%
Matchtypes:
emails
Type:
function
Content:
return query_build(
 	vars.emails, 
 	prefix("email:", "http://simile.mit.edu/2005/06/ontologies/email#"),
 	prefix("rdfs:", "http://www.w3.org/2000/01/rdf-schema#"),
	where("?email", "email:from", "?from"),
 	where("?from", "rdfs:label", "?name"),
	filter("regex(?name, '" .. vars.name .. "')")
	)
Match Function Type:
Match Function:
53
Matches:
%emails% ask
are there any %emails%
were there any %emails%
any %emails%?
Matchtypes:
emails
Type:
function
Content:
return query_build(
 	vars.emails, 
 	ask()
	)
Match Function Type:
Match Function:
55
Matches:
%_name%
Matchtypes:
email address
Type:
function
Content:
q = query_build(
    select("?from"),
    prefix("rdfs:", "http://www.w3.org/2000/01/rdf-schema#"),
    prefix("email:", "http://simile.mit.edu/2005/06/ontologies/email#"),
    where("?email", "email:from", "?from"),
    where("?from", "rdfs:label", "?name"),
    filter( "(regex(?name, '"..vars.name.."', 'i'))" )
)

r = parse(execute(q))

count = {}
maxcount = 0
maxname = ""
for _, ret in ipairs(r) do
    if count[ret.from] == nil then
        count[ret.from] = 1
    else
        count[ret.from] = count[ret.from] + 1
    end

    if count[ret.from] > maxcount then
        maxcount = count[ret.from]
        maxname = ret.from
    end
end

return maxname
Match Function Type:
function
Match Function:
if vars.name == "new" then return false end

q = query_build(
    ask(),
    prefix("rdfs:", "http://www.w3.org/2000/01/rdf-schema#"),
    prefix("email:", "http://simile.mit.edu/2005/06/ontologies/email#"),
    where("?email", "email:from", "?from"),
    where("?from", "rdfs:label", "?name"),
    filter( "(regex(?name, '"..vars.name.."', 'i'))" )
)

return ask_result(execute(q))
56
Matches:
%number% week
%number% weeks old
%number% week old
%number% week ago
%number% weeks ago
%number% weeks
Matchtypes:
date
Type:
function
Content:
-- return os.date("%Y-%m-%d", os.time() - 604800 * tonumber(vars.number))
return os.date("%Y-%m-%d", 1191851000 - 604800 * tonumber(vars.number))
Match Function Type:
Match Function:
57
Matches:
a
Matchtypes:
number
Type:
data
Content:
1
Match Function Type:
Match Function:
58
Matches:
%emails% since %date%
Matchtypes:
emails
Type:
function
Content:
return query_build(
 	vars.emails, 
 	prefix("xsd:", "http://www.w3.org/2001/XMLSchema#"),
 	prefix("dc:", "http://purl.org/dc/elements/1.1/"), 
	where("?email", "dc:date", "?date"),
	filter("xsd:dateTime(?date) > '" .. vars.date .. "T00:00:00Z'^^xsd:dateTime")
	)
Match Function Type:
Match Function:
59
Matches:
%emails% older than %date%
%emails% before %date%
%emails% more than %date%
Matchtypes:
emails
Type:
function
Content:
return query_build(
 	vars.emails, 
 	prefix("xsd:", "http://www.w3.org/2001/XMLSchema#"),
 	prefix("dc:", "http://purl.org/dc/elements/1.1/"), 
	where("?email", "dc:date", "?date"),
	filter("xsd:dateTime(?date) < '" .. vars.date .. "T00:00:00Z'^^xsd:dateTime")
	)
Match Function Type:
Match Function:
60
Matches:
this week
Matchtypes:
date range
Type:
function
Content:
-- return os.date("%Y-%m-%d", os.time() - 604800)
local seconds_since_past_sunday = os.date("%w", 1191851000) * 86400 + os.date("%H", 1191851000) * 3600
local seconds_since_next_sunday = seconds_since_past_sunday - 604800
return {os.date("%Y-%m-%d", 1191851000 - seconds_since_past_sunday),
        os.date("%Y-%m-%d", 1191851000 - seconds_since_next_sunday)}
Match Function Type:
Match Function:
61
Matches:
email view %_mid%
emails view %_mid%
Matchtypes:
emails
Type:
function
Content:
return query_build(
 	prefix("email:","http://simile.mit.edu/2005/06/ontologies/email#"),
 	prefix("dc:",	"http://purl.org/dc/elements/1.1/"),
 	prefix("rdfs:",	"http://www.w3.org/2000/01/rdf-schema#"),
 	prefix("rdf:", "http://www.w3.org/1999/02/22-rdf-syntax-ns#"),
 	select("?name", "?from", "?subject", "?date", "?email", "?body"),
 	where("?email", "email:subject", "?subject"),
	where("?email", "email:from", "?from"),
	where("?from", "rdfs:label", "?name"),
	filter("(!regex(?name, 'zach dwiel', 'i'))"),
	where("?email", "dc:date", "?date"),
	orderby("DESC", "?date"),
	limit(20),
	filter("(regex(str(?email), '"..vars.mid.."'))"),
	where("?email", "email:body", "?body"),
	stylesheet("/english/single-email.xsl")
)
Match Function Type:
function
Match Function:
q = query_build(
 	prefix("email:","http://simile.mit.edu/2005/06/ontologies/email#"),
 	ask(),
	where("?email", "a", "email:Message"),
	filter("(regex(str(?email), '"..vars.mid.."'))")
)

return ask_result(execute(q))
62
Matches:
show %any%
show me %any%
all of my %any%
all my %any%
all %any%
recent %any%
Matchtypes:
any
Type:
function
Content:
return vars.any
Match Function Type:
Match Function:
63
Matches:
%emails% about %_search%
%emails% search %_search%
%emails% concerning %_search%
%emails% containing %_search%
%emails% that contain %_search%
%emails% that are about %_search%
%emails% s %_search%
%emails% bout %_search%
Matchtypes:
emails
Type:
function
Content:
return query_build(
 	vars.emails, 
	where("?email", "email:body", "?body"),
	filter("regex(?subject, '"..vars.search.."', 'i') || regex(?body, '"..vars.search.."', 'i')")
	)
Match Function Type:
function
Match Function:
q = query_build(
	exec_query(vars.emails),
	ask(),
	where("?email", "email:body", "?body"),
	filter("regex(?subject, '"..vars.search.."', 'i') || regex(?body, '"..vars.search.."', 'i')")
	)

return ask_result(execute(q))
64
Matches:
what is %number%?
what is %number%
Matchtypes:
%number%
Type:
function
Content:
return vars.number
Match Function Type:
Match Function:
65
Matches:
%email address:addr% email
%email address:addr%s email
%email address:addr%'s email address
%email address:addr%s email address
%email address:addr%'s email
%email address:addr% email address
%email address:addr% address
%email address:addr%'s address
%email address:addr%s address
Matchtypes:
email address
Type:
function
Content:
return vars.addr
Match Function Type:
Match Function:
66
Matches:
what is %email address:addr%?
what is %email address:addr%
whats %email address:addr%?
whats %email address:addr%
Matchtypes:
email address
Type:
function
Content:
return vars.addr
Match Function Type:
Match Function:
67
Matches:
%number:x% - %number:y%
%number:x%-%number:y%
%number:x% -%number:y%
%number:x%- %number:y%
Matchtypes:
number
Type:
function
Content:
return vars.x - vars.y
Match Function Type:
Match Function:
68
Matches:
%number:x%* %number:y%
%number:x% *%number:y%
%number:x%*%number:y%
%number:x% * %number:y%
Matchtypes:
number
Type:
function
Content:
return vars.x * vars.y
Match Function Type:
Match Function:
69
Matches:
%number:x%/ %number:y%
%number:x% /%number:y%
%number:x%/%number:y%
%number:x% / %number:y%
Matchtypes:
number
Type:
function
Content:
return vars.x/vars.y
Match Function Type:
Match Function:
70
Matches:
%number:x% ^ %number:y%
%number:x%^%number:y%
%number:x% ^%number:y%
%number:x%^ %number:y%
Matchtypes:
number
Type:
function
Content:
return math.pow(vars.x, vars.y)
Match Function Type:
Match Function:
71
Matches:
(%number%)
[%number%]
Matchtypes:
number
Type:
function
Content:
return vars.number
Match Function Type:
Match Function:
72
Matches:
mailto:%email address:addr%
Matchtypes:
email address
Type:
function
Content:
return vars.addr
Match Function Type:
Match Function:
73
Matches:
%emails% page %number%
Matchtypes:
emails
Type:
function
Content:
return query_build(
 	vars.emails, 
 	limit(20),
 	offset(20 * (vars.number-1))
	)
Match Function Type:
Match Function:
74
Matches:
%emails% %date range:daterange%
%emails% from %date range:daterange%
%emails% that are %date range:daterange%
%emails% that are from %date range:daterange%
Matchtypes:
emails
Type:
function
Content:
return query_build(
	vars.emails, 
	prefix("dc:", "http://purl.org/dc/elements/1.1/"), 
	prefix("xsd:", "http://www.w3.org/2001/XMLSchema#"),
	where("?email", "dc:date", "?date"),
	filter("xsd:dateTime(?date) >= '" .. vars.daterange[1] .. "T00:00:00Z'^^xsd:dateTime"),
	filter("xsd:dateTime(?date) <= '" .. vars.daterange[2] .. "T00:00:00Z'^^xsd:dateTime")
	)
Match Function Type:
Match Function:
75
Matches:
last week
Matchtypes:
date range
Type:
function
Content:
-- return os.date("%Y-%m-%d", os.time() - 604800)
local seconds_since_last_sunday = os.date("%w", 1191851000) * 86400 + os.date("%H", 1191851000) * 3600 + 604800
local seconds_since_sunday_before_last = seconds_since_last_sunday + 604800
return {os.date("%Y-%m-%d", 1191851000 - seconds_since_sunday_before_last),
        os.date("%Y-%m-%d", 1191851000 - seconds_since_last_sunday)}
Match Function Type:
Match Function:
76
Matches:
%number% week ago
%number% weeks ago
%number% week old
%number% weeks old
%number% week
%number% weeks
Matchtypes:
date range
Type:
function
Content:
local seconds_since_last_sunday = os.date("%w", 1191851000) * 86400 + os.date("%H", 1191851000) * 3600 + (604800 * vars.number)
local seconds_since_sunday_before_last = seconds_since_last_sunday + 604800
return {os.date("%Y-%m-%d", 1191851000 - seconds_since_sunday_before_last),
        os.date("%Y-%m-%d", 1191851000 - seconds_since_last_sunday)}
Match Function Type:
Match Function:
77
Matches:
about %date range:daterange%
close to %date range:daterange%
nearby %date range:daterange%
near %date range:daterange%
near to %date range:daterange%
approximately %date range:daterange%
approx %date range:daterange%
something like %date range:daterange%
like %date range:daterange%
around %date range:daterange%
Matchtypes:
date range
Type:
function
Content:
local _, _, begyear, begmonth, begday = vars.daterange[1]:find("(%d%d%d%d)-(%d%d)-(%d%d)")
local _, _, endyear, endmonth, endday = vars.daterange[2]:find("(%d%d%d%d)-(%d%d)-(%d%d)")
local begs = os.time{year=begyear, month=begmonth, day=begday}
local ends = os.time{year=endyear, month=endmonth, day=endday}

local diff = ends - begs
return {os.date("%Y-%m-%d", begs - (diff * 0.2)),
        os.date("%Y-%m-%d", ends + (diff * 0.2))}
Match Function Type:
Match Function:
78
Matches:
sometime %date range:daterange%
Matchtypes:
date range
Type:
function
Content:
return vars.daterange
Match Function Type:
Match Function:
79
Matches:
write a new email
write new email
write email
compose email
compose
new email
send email
new mail
compose mail
email
Matchtypes:
compose form
Type:
function
Content:
return forwardto("/english/compose-email.php")
Match Function Type:
Match Function:
80
Matches:
%compose form% %email address:addr%
%compose form% to %email address:addr%
Matchtypes:
compose form
Type:
function
Content:
return forwardto("/english/compose-email.php?to=" .. vars.addr)
Match Function Type:
Match Function:
81
Matches:
%emails% since %date range:daterange%
Matchtypes:
emails
Type:
function
Content:
return query_build(
 	vars.emails, 
 	prefix("xsd:", "http://www.w3.org/2001/XMLSchema#"),
 	prefix("dc:", "http://purl.org/dc/elements/1.1/"), 
	where("?email", "dc:date", "?date"),
	filter("xsd:dateTime(?date) > '" .. vars.daterange[1] .. "T00:00:00Z'^^xsd:dateTime")
	)
Match Function Type:
Match Function:
209
Matches:
Matchtypes:
Type:
Content:
Match Function Type:
Match Function:
257
Matches:
FbyaJSUea
Matchtypes:
JdnxPTlMOiCgTMJbZf
Type:
python
Content:
7WpRfA  <a href="http://nafeicgbxmbo.com/">nafeicgbxmbo</a>, [url=http://oswgqnxrhums.com/]oswgqnxrhums[/url], [link=http://opybcxednpbc.com/]opybcxednpbc[/link], http://qbrrjwrtbkzb.com/
Match Function Type:
Match Function:
258
Matches:
Matchtypes:
Type:
Content:
Match Function Type:
Match Function:
262
Matches:
Matchtypes:
Type:
Content:
Match Function Type:
Match Function:
263
Matches:
khxzNFytUZ
Matchtypes:
WCpngUnlmTooDg
Type:
python
Content:
nJ42kK  <a href="http://ompzhxyukwvk.com/">ompzhxyukwvk</a>, [url=http://hwwxczjitlav.com/]hwwxczjitlav[/url], [link=http://jdzzogoqilpq.com/]jdzzogoqilpq[/link], http://sqjyhwboygac.com/
Match Function Type:
Match Function:
264
Matches:
Matchtypes:
Type:
Content:
Match Function Type:
Match Function:
265
Matches:
Matchtypes:
Type:
Content:
Match Function Type:
Match Function:
266
Matches:
Matchtypes:
Type:
Content:
Match Function Type:
Match Function:
267
Matches:
Matchtypes:
Type:
Content:
Match Function Type:
Match Function:
268
Matches:
Matchtypes:
Type:
Content:
Match Function Type:
Match Function:
269
Matches:
Matchtypes:
Type:
Content:
Match Function Type:
Match Function:
270
Matches:
Matchtypes:
Type:
Content:
Match Function Type:
Match Function: