Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
54 lines (35 sloc) 1.45 KB
module Y2016.M07.D07.Exercise where
import Data.SymbolTable
import Data.SymbolTable.Decompiler
import Network.HTTP
import Y2016.M07.D06.PrideAndPrejudice
Pride and Prejudice and ... Dracula? Anyone? No?
So, now that we have Pride and Prejudice encoded (see above), let's use it
to encode another work.
Today's exercise.
Dracula, by Bram Stoker, is available on the web here:
Encode it into a symbol table as you did for Pride and Prejudice. Good.
type Novel = String
dracula2Syms :: Novel -> SymbolTable
dracula2Syms = undefined
(remember that "(Illustration:" is not a word but "Illustration" is.)
Now, re assemble the document Dracula, but substituting each word in that
novel for the a word similarly indexed from the Pride and Prejudice novel.
What we are doing is encoding Dracula in English but using a very different
mode of expression to encode it. What is the resulting novel you produce?
reinterpretDracula :: SymbolTable -> SymbolTable -> Novel -> Novel
reinterpretDracula pnpsyms draculasyms drac = undefined
Hint: lookup the symbol index for each word in the novel Dracula, then, using
that symbol index, replace it with the word in the Pride and Prejudice symbol
Hint: You can convert a Haskle module of a symbol-table to SymbolTable
by using a function in Data.SymbolTable.Decompiler.
Hint: You can use Network.HTTP to interact with these novels on project
You can’t perform that action at this time.