ageron / ageron/handson-ml2

Chapter 3: Exercice 4, line 147

Open
#207 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
30k
Forks
13.1k
PR merge metrics
No merged PRs in 30d

Description

`print(email_to_text(sample_html_spam)[:100], "...")
`

This line is unuseful since it's applyed on 'sample_html_spam' which contain only (text / html) structure emails.

To check if the function 'email_to_text' works well on "**whatever**" email we should try it on non (text / html) or (text/plain) structures (in this case we are interested in multipart structure emails):
```
multipart_emails = [email for email in X_train
if not get_email_structure(email) in ("text/plain", "text/html")]

sample_multipart_email = multipart_emails[100]
print(email_to_text(sample_multipart_email)[:1000], "...")
```

what do you think ?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.