novy slovnik substantiv
[krypto.git] / ocesavac.py
index 15a79fb..f762333 100644 (file)
@@ -28,3 +28,14 @@ def ocesat(text, mezery=True):
         return ''.join(pole)
     else: # bez mezer
         return ''.join([c for c in text if c in ABECEDA])
+
+def interactive():
+    import sys
+    import codecs
+    sys.stdin = codecs.getreader('utf-8')(sys.stdin)
+    sys.stdout = codecs.getwriter('utf-8')(sys.stdout)
+    for line in sys.stdin.readlines():
+        print " ".join(deaccent(line).lower().split())
+
+if __name__ == '__main__':
+    interactive()