Assignment #2:
Using NLP for decoding cipher-text

Problem #1 -- Ceasar/Rotating Cipher:

The following text is generated using the rotating cipher with a shif of n. The goal is to find the correct sentence using the language models we have learned from the class.

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

Goal: Write a program to decode the above message by

  • building a language model (e.g., unigram model) that maximizes the P() based on Naive Bayes assumption.

Total credits: 5 pts

Problem #2 -- Shredded papers reconstruction:

The following text is generated using a shreding machine. The columns are shifted (randomized), rows orders are maintained. The goal is to find the original text. You can download the txt file from here.

|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 |  |  |. |

Goal: Reconstruct shredded paper to its original content.

Total credits: 10 pts

Resources for the assignment: