Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions talon/quotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
'Den',
# Vietnamese
u'Vào',
# Italian
'Il', 'In data', 'Il giorno',
)),
# Date and sender separator
u'|'.join((
Expand All @@ -71,6 +73,8 @@
'skrev',
# Vietnamese
u'đã viết',
# Italian
'scritto', 'inviato',
))
))
# Special case for languages where text is translated like this: 'on {date} wrote {somebody}:'
Expand All @@ -80,14 +84,18 @@
u'|'.join((
'Op',
#German
'Am'
'Am',
# Italian
'In data', 'Il giorno', 'Il',
)),
# Ending of the line
u'|'.join((
# Dutch
'schreef','verzond','geschreven',
# German
'schrieb'
'schrieb',
# Italian
'ha scritto', 'ha scritto:', 'ha inviato',
))
)
)
Expand Down Expand Up @@ -136,18 +144,20 @@
u'Ursprüngliche Nachricht', 'Antwort Nachricht',
# Danish
'Oprindelig meddelelse',
# Italiano
'Messaggio originale', 'Messaggio di risposta',
))), re.I)

RE_FROM_COLON_OR_DATE_COLON = re.compile(u'((_+\r?\n)?[\s]*:?[*]?({})[\s]?:([^\n$]+\n){{1,2}}){{2,}}'.format(
u'|'.join((
# "From" in different languages.
'From', 'Van', 'De', 'Von', 'Fra', u'Från',
'From', 'Van', 'De', 'Von', 'Fra', u'Från', 'Da',
# "Date" in different languages.
'Date', '[S]ent', 'Datum', u'Envoyé', 'Skickat', 'Sendt', 'Gesendet',
'Date', '[S]ent', 'Datum', u'Envoyé', 'Skickat', 'Sendt', 'Gesendet', 'Data',
# "Subject" in different languages.
'Subject', 'Betreff', 'Objet', 'Emne', u'Ämne',
'Subject', 'Betreff', 'Objet', 'Emne', u'Ämne', 'Oggetto',
# "To" in different languages.
'To', 'An', 'Til', u'À', 'Till'
'To', 'An', 'Til', u'À', 'Till', 'A',
))), re.I | re.M)

# ---- John Smith wrote ----
Expand Down
14 changes: 14 additions & 0 deletions talon/signature/bruteforce.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,18 @@
^cheers[\s,!]*$
|
^best[ a-z]*[\s,!]*$
|
^ciao[ a-z]*[\s,!]*$
|
^saluti[ a-z]*[\s,!]*$
|
^saluto[ a-z]*[\s,!]*$
|
^buona[ a-z]*[\s,!]*$
|
^distinti[ a-z]*[\s,!]*$
|
^cordiali[ a-z]*[\s,!]*$
)
.*
)
Expand All @@ -39,6 +51,8 @@
^sent[ ]([\S]*[ ])?from[ ]my[ ]BlackBerry.*$
|
^Enviado[ ]desde[ ]mi[ ]([\S]+[ ]){0,2}BlackBerry.*$
|
^Inviato[ ]dal[ ]mio[ ]([\S]+[ ]){0,2}Iphone.*$
)
.*
)
Expand Down