2 ms·
Reading email sent by a human requires NLP features that I don't see in this example. Sure, headers have clear meanings and delimiters, but bodies are pure spee
by dsr_ 11y ago
Reading email sent by a human requires NLP features that I don't see in this example. Sure, headers have clear meanings and delimiters, but bodies are pure speech. Don't be fooled by the fact that they arrive as strings:
"Hey I saw you had a table for sale, I need one. I can give you like $30 for it and a puppy." <= in which the sender has sent mail to a list instead of a person and does not have a table for sale, even though it matches the regexp and provides a parseable price.
"The table is A QueeN Anne style repro abouT $0 years old, I think five hundred is a fair price but we can haggle." <= in which the seller holds down a shift key a little too early and the program will register a price of free rather than $500.
You've heard that it isn't a good idea to parse HTML with regexps? Natural human languages are worse.
- nocoffeebreak 11y agoWolfram language has a lot of NLP features too... http://reference.wolfram.com/language/guide/FreeFormAndExternalInput.html http://reference.wolfram.com/language/guide/FreeFormAndExter...
- viewer5 11y ago> You've heard that it isn't a good idea to parse HTML with regexps? That does sound familiar... http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags http://stackoverflow.com/questions/1732348/regex-match-open-...