Skip to content

armgit / laya

Public Imported from GitHub
0

Non-autoregressive System 1 decision engine. Typed choice, score and yes/no decisions over any text in a single forward pass, in 100+ languages, with a router that picks the right checkpoint per request.

chore: merge upstream main and retain email footer fix

Lloyd Aloysius78854f60497e
diff --cc laya/email.py
index f5d91b84,773ba827..49d453ed
--- a/laya/email.py
+++ b/laya/email.py
@@@ -51,14 -85,11 +85,10 @@@ _SIGNATURE_MARKERS =
# the line is a sentence, and the case of the next word is what separates the two: a name is
# capitalised, "for" in "Thanks for the quick reply." is not. The closing words are matched
# case-insensitively, the name is not, so the flag is scoped instead of global.
- # `warmest` and `and/& regards` are closings the alternation did not reach, and a name is
- # capitalised in any script, so the name class excludes the lowercase letters instead of
- # listing the uppercase ones: `Regards, Łukasz` is a sign-off, `Thanks for the reply` is not.
- re.compile(
- r"^\s*(?i:best|kind|warmest|warm|many thanks|thanks|thank you|regards|cheers|sincerely)"
- r"(?i:\s+(?:and|&)\s+regards|\s+(?:regards|wishes|again|in advance|a lot|so much|very much))?"
- r"[\s,;:!.]*(?:[^\W\d_a-zß-öø-ÿ][\w'-]*[\s,.]*){0,3}$"
- ),
+ # `warmest` and `and/& regards` are closings the alternation did not reach; the name that may
+ # follow is judged in `_is_english_signoff` above, a callable because `re` cannot express its
+ # rule. `Regards, Łukasz` is a sign-off, `Thanks for the reply` is not.
+ _is_english_signoff,
- re.compile(r"^\s*sent from my (iphone|android|mobile|ipad)", re.I),
# Portuguese/Spanish sign-offs match only on their own: "Obrigado pelo retorno, mas ..." is a
# request, not a signature, so unlike the English marker no trailing words are allowed
re.compile(