Created
July 11, 2010 14:58
-
-
Save erlehmann/471610 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import zlib | |
sentences = [ | |
'Vor einem Jahr habe ich mir fuer ca. 300 Euro die Casio Exilim Kamera gekauft.', | |
'Ich bonerte und sturbierte, bis mein Sack leer war. MEIN SACK MEIN SACK MEIN SACK', | |
'SAGE SAGE SAGE SAGE SAGE SAGE SAGE SAGE SAGE SAGE SAGE SAGE SAGE SAGE SAGE SAGE' | |
] | |
for s in sentences: | |
ratio = len(s) / len(zlib.compress(s)) | |
if ratio <3: | |
print s | |
else: | |
print "(ZIP)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment