/ai-playground

Playground for AI problems

Primary LanguagePythonOtherNOASSERTION

AI Class NLP problems

Rotation Cipher

Decode the following text encoded in rotation cipher:

Esp qtcde nzyqpcpynp zy esp ezatn zq Lcetqtntlw Tyepwwtrpynp hld spwo le Olcexzfes Nzwwprp ty estd jplc.

Solutions

  • Using a probabilistic letter model: src/rotation_cipher_plm.py
  • Using gzip: src/rotation_cipher_gzip.py

"Shredded" Text

Decode the message (split in 2 letter columns):

|de|  | f|Cl|nf|ed|au| i|ti|  |ma|ha|or|nn|ou| S|on|nd|on|
|ry|  |is|th|is| b|eo|as|  |  |f |wh| o|ic| t|, |  |he|h |
|ab|  |la|pr|od|ge|ob| m|an|  |s |is|el|ti|ng|il|d |ua|c |
|he|  |ea|of|ho| m| t|et|ha|  | t|od|ds|e |ki| c|t |ng|br|
|wo|m,|to|yo|hi|ve|u | t|ob|  |pr|d |s |us| s|ul|le|ol|e |
| t|ca| t|wi| M|d |th|"A|ma|l |he| p|at|ap|it|he|ti|le|er|
|ry|d |un|Th|" |io|eo|n,|is|  |bl|f |pu|Co|ic| o|he|at|mm|
|hi|  |  |in|  |  | t|  |  |  |  |ye|  |ar|  |s |  |  |. |

Solutions

  • Using a probabilistic word model: src/shuffle_pwd.py

Word list

From Peter Norvig's "Natural Language Corpus Data: Beautiful Data" (MIT license).