A port of GitHub's Email Reply Parser library, by the fine folks at Zapier, with added language support.
Currently supported languages:
Arabic German English Spanish Finnish French Hebrew Indonesian Italian Japanese Korean Dutch Polish Portuguese Russian Slovak Thai Turkish Vietnamese Chinese
Email Reply Parser makes it easy to grab only the last reply to an on-going email thread.
Say you'd like to parse out a user's response to your transaction email messages:
Yes that is fine, I will email you in the morning.
On Fri, Nov 16, 2012 at 1:48 PM, Zapier <[email protected]> wrote:
> Our support team just commented on your open Ticket:
> "Hi Royce, can we chat in the morning about your question?"
Email clients handle reply formatting differently, making parsing a pain. We include tests for many cases. The parsed email:
Yes that is fine, I will email you in the morning.
Using pip, use command:
pip install email_reply_parser
Step 1: Import email reply parser package
from email_reply_parser import EmailReplyParser
Step 2: Provide email message as type String
parser = EmailReplyParser(language='en')
parser.read(email_message)
Step 1: Import email reply parser package
from email_reply_parser import EmailReplyParser
Step 2: Provide email message as type string using parse_reply.
parser = EmailReplyParser(language='en')
EmailReplyParser.parse_reply(email_message)