@@ -16,17 +16,31 @@ source: |
1616 and length(body.previous_threads) == 0
1717 and 20 < length(body.current_thread.text) < 500
1818 and regex.icontains(strings.replace_confusables(body.current_thread.text),
19- "screenshot|error list|plan|quote|rank|professional|price"
19+ "(?: screenshot|error list|plan|quote|rank|professional|price|mistake) "
2020 )
21- and regex.icontains(strings.replace_confusables(body.current_thread.text), ".*(hi|hello|hey)")
2221 and regex.icontains(strings.replace_confusables(body.current_thread.text),
23- ".*(error|report|issues|website)"
22+ 'h(?:i|ello|ey)\b'
2423 )
2524 and regex.icontains(strings.replace_confusables(body.current_thread.text),
26- ".*(site|website|page )"
25+ "(?:error|report|issues|repair|redesign|upgrade )"
2726 )
28- and regex.icontains(strings.replace_confusables(subject.subject),
29- ".*(proposal|cost|report|error|audit|screenshot|strategy)"
27+ and regex.icontains(strings.replace_confusables(body.current_thread.text),
28+ "(?:site|website|page)"
29+ )
30+ and (
31+ regex.icontains(strings.replace_confusables(subject.subject),
32+ "(?:proposal|cost|estimate|error|bug|audit|screenshot|strategy|rankings|issues|fix|website|design)"
33+ )
34+ or (
35+ strings.icontains(strings.replace_confusables(subject.subject),
36+ "report"
37+ )
38+ and regex.icontains(strings.replace_confusables(body.current_thread.text
39+ ),
40+ "(?:free|send you|can i send|may i send|let me know|interested|get back to me|reply back)"
41+ )
42+ )
43+ or length(subject.base) < 5
3044 )
3145 ),
3246 // Single thread message groups but with 1 unsubscribe link or link is recipient
@@ -40,36 +54,66 @@ source: |
4054 and length(body.previous_threads) == 0
4155 and 20 < length(body.current_thread.text) < 500
4256 and regex.icontains(strings.replace_confusables(body.current_thread.text),
43- "screenshot|error list|plan|quote|rank|professional|price"
57+ "(?: screenshot|error list|plan|quote|rank|professional|price) "
4458 )
45- and regex.icontains(strings.replace_confusables(body.current_thread.text), ".*(hi|hello|hey)")
4659 and regex.icontains(strings.replace_confusables(body.current_thread.text),
47- ".*(error|report|issues|website)"
60+ 'h(?:i|ello|ey)\b'
4861 )
4962 and regex.icontains(strings.replace_confusables(body.current_thread.text),
50- ".*(site| website)"
63+ "(?:error|report|issues| website|repair|redesign|upgrade )"
5164 )
52- and regex.icontains(strings.replace_confusables(subject.subject),
53- ".*(proposal|cost|report|error|audit|screenshot|strategy)"
65+ and regex.icontains(strings.replace_confusables(body.current_thread.text),
66+ "(?:site|website|page)"
67+ )
68+ and (
69+ regex.icontains(strings.replace_confusables(subject.subject),
70+ "(?:proposal|cost|estimate|error|bug|audit|screenshot|strategy|rankings|issues|fix|website|design)"
71+ )
72+ or (
73+ strings.icontains(strings.replace_confusables(subject.subject),
74+ "report"
75+ )
76+ and regex.icontains(strings.replace_confusables(body.current_thread.text),
77+ "(?:free|send you|can i send|may i send|let me know|interested|get back to me|reply back)"
78+ )
79+ )
80+ or length(subject.base) < 5
5481 )
5582 ),
5683 // Multiple thread message groups
5784 (
5885 length(attachments) == 0
5986 and length(body.links) == 0
6087 and length(body.previous_threads) < 5
61- and regex.icontains(strings.replace_confusables(subject.subject),
62- ".*(proposal|cost|report|error|audit|screenshot|strategy)"
88+ and (
89+ regex.icontains(strings.replace_confusables(subject.subject),
90+ "(?:proposal|cost|estimate|error|bug|audit|screenshot|strategy|rankings|issues|fix|website|design)"
91+ )
92+ or (
93+ (
94+ length(subject.base) < 5
95+ or subject.is_reply or subject.is_forward
96+ )
97+ and any(body.previous_threads,
98+ regex.icontains(strings.replace_confusables(.text),
99+ "(?:screenshot|website)"
100+ )
101+ )
102+ )
63103 )
64104 and any(body.previous_threads,
65105 length(.text) < 400
66- and regex.icontains(strings.replace_confusables(.text),
67- '.*(hey|hi|hello)'
106+ and (
107+ regex.icontains(strings.replace_confusables(.text),
108+ 'h(?:i|ello|ey)\b'
109+ )
110+ or strings.icontains(strings.replace_confusables(.text),
111+ "morning"
112+ )
68113 )
69114 and regex.icontains(strings.replace_confusables(.text),
70- '.*( \berror(?:\s+list)?\b|screenshot|report|plan)'
115+ '(?: \berror(?:\s+list)?\b|screenshot|report|plan)'
71116 )
72- and strings.count(.text, "?") >= 3
73117 and ml.nlu_classifier(.text).language == "english"
74118 )
75119 )
0 commit comments