| 1 |
"""Filthy words. |
| 2 |
|
| 3 |
--- |
| 4 |
layout: post |
| 5 |
source: George Carlin |
| 6 |
source_url: https://youtu.be/kyBH5oNQOS0 |
| 7 |
title: filthy words |
| 8 |
date: 2014-06-10 12:31:19 |
| 9 |
categories: writing |
| 10 |
--- |
| 11 |
|
| 12 |
Filthy words. |
| 13 |
|
| 14 |
""" |
| 15 |
from proselint.tools import existence_check, memoize |
| 16 |
|
| 17 |
|
| 18 |
@memoize |
| 19 |
def check(text): |
| 20 |
"""Check the text.""" |
| 21 |
err = "cursing.filth" |
| 22 |
msg = """Nobody ever tells you this as a kid, but you're supposed to avoid |
| 23 |
this word.""" |
| 24 |
|
| 25 |
list = [ |
| 26 |
"shit", |
| 27 |
"piss", |
| 28 |
"fuck", |
| 29 |
"cunt", |
| 30 |
"cocksucker", |
| 31 |
"motherfucker", |
| 32 |
"tits", |
| 33 |
"fart", |
| 34 |
"turd", |
| 35 |
"twat", |
| 36 |
] |
| 37 |
|
| 38 |
return existence_check(text, list, err, msg) |