In [1]:
# First Always set logging
import logging
logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', level=logging.INFO)

How to install package


In [2]:
!pip3 install numpy
!pip3 install gensim


Collecting numpy
  Using cached numpy-1.12.1-cp35-cp35m-manylinux1_x86_64.whl
Installing collected packages: numpy
Successfully installed numpy-1.12.1
You are using pip version 8.1.1, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting gensim
Collecting numpy>=1.3 (from gensim)
  Using cached numpy-1.12.1-cp35-cp35m-manylinux1_x86_64.whl
Collecting smart-open>=1.2.1 (from gensim)
Collecting scipy>=0.7.0 (from gensim)
  Using cached scipy-0.19.0-cp35-cp35m-manylinux1_x86_64.whl
Collecting six>=1.5.0 (from gensim)
  Using cached six-1.10.0-py2.py3-none-any.whl
Collecting requests (from smart-open>=1.2.1->gensim)
  Using cached requests-2.17.3-py2.py3-none-any.whl
Collecting boto>=2.32 (from smart-open>=1.2.1->gensim)
  Using cached boto-2.47.0-py2.py3-none-any.whl
Collecting bz2file (from smart-open>=1.2.1->gensim)
Collecting urllib3<1.22,>=1.21.1 (from requests->smart-open>=1.2.1->gensim)
  Using cached urllib3-1.21.1-py2.py3-none-any.whl
Collecting idna<2.6,>=2.5 (from requests->smart-open>=1.2.1->gensim)
  Using cached idna-2.5-py2.py3-none-any.whl
Collecting certifi>=2017.4.17 (from requests->smart-open>=1.2.1->gensim)
  Using cached certifi-2017.4.17-py2.py3-none-any.whl
Collecting chardet<3.1.0,>=3.0.2 (from requests->smart-open>=1.2.1->gensim)
  Using cached chardet-3.0.3-py2.py3-none-any.whl
Installing collected packages: numpy, urllib3, idna, certifi, chardet, requests, boto, bz2file, smart-open, scipy, six, gensim
Successfully installed boto-2.47.0 bz2file-0.98 certifi-2017.4.17 chardet-3.0.3 gensim-2.1.0 idna-2.5 numpy-1.12.1 requests-2.17.0 scipy-0.19.0 six-1.10.0 smart-open-1.5.3 urllib3-1.21.1
You are using pip version 8.1.1, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

How to import package


In [3]:
from collections import defaultdict

How to read a file


In [4]:
text_file = open('train-data/problem-142/original.txt', 'r', encoding="utf8")
original_text = text_file.read()
text = original_text[:]

Read a randon text


In [5]:
from random import randint

randon_number = randint(1,205)
rnl = len(str(randon_number))

if rnl < 3:
    formated_number = '0' + str(randon_number)
elif rnl < 2:
    formated_number = '00' + str(randon_number)
else:
    formated_number = str(randon_number)

file_name = 'train-data/problem-{0}/original.txt'.format(formated_number)
print('Randomly selected file: {0}'.format(file_name))

random_text_file = open(file_name, 'r', encoding="utf8")
original_random_text = random_text_file.read()
random_text = original_text[:]


Randomly selected file: train-data/problem-127/original.txt

Switch between random and selected text


In [6]:
random_t = False

if random_t:
    text = random_text
    original_text = original_random_text

Obfuscation methods

Paraphrase function


In [7]:
paraphrase_dictionary = defaultdict(dict)
with open('./dictionaries/phrasal-corpus.txt', 'r', encoding='utf-8') as f:
    s = f.read()
    temp = s.splitlines()
    for x in temp:
        split = x.split(' - ')
        paraphrase_dictionary[split[0]] = split[1]
        

def paraphrase(text):
    text_size = len(text.split(' '))
    used_phrases = []
    for key, value in paraphrase_dictionary.items():
        augmented_key = ' ' + key + ' '
        if augmented_key in text and augmented_key not in used_phrases:
            print('----- Replaced: >' + key + '< with >' + value)
            augmented_value = ' ' + value + ' '
            text = text.replace(augmented_key, augmented_value)
            used_phrases.append(augmented_value)
            
    change_metric = len(used_phrases) / text_size
    print ("Change metric (number of replaces / number of text words: )" + str(change_metric))
    return text, change_metric

Random paraphrase function


In [8]:
import random

paraphrase_dictionary = defaultdict(dict)
with open('./dictionaries/phrasal-corpus.txt', 'r', encoding='utf-8') as f:
    s = f.read()
    temp = s.splitlines()
    for x in temp:
        split = x.split(' - ')
        paraphrase_dictionary[split[0]] = split[1]
        

def random_paraphrase(text):
    text_size = len(text.split(' '))
    used_phrases = []
    for key, value in paraphrase_dictionary.items():
        augmented_key = ' ' + key + ' '
        if augmented_key in text and augmented_key not in used_phrases:
            random_key, random_value = random.choice(list(paraphrase_dictionary.items()))
            print('----- Replaced: >' + key + '< with >' + random_value)
            augmented_value = ' ' + random_value + ' '
            text = text.replace(augmented_key, augmented_value)
            used_phrases.append(augmented_value)
    return text

Create text with random content used for baseline


In [9]:
print('Text with random content')
randomized_text = random_paraphrase(text)


Text with random content
----- Replaced: >terror.< with >what he did to me
----- Replaced: >things,< with >in some areas.
----- Replaced: >by the many< with >by becoming a party
----- Replaced: >father did< with >your papa
----- Replaced: >and the< with >improving the efficiency of
----- Replaced: >murder,< with >important steps to
----- Replaced: >may ask< with >regard?
----- Replaced: >more human< with >proposed changes,
----- Replaced: >offset by< with >department of statistics.
----- Replaced: >louder< with >the committee declared
----- Replaced: >and again,< with >'s senior minister lee kuan yew
----- Replaced: >release< with >and targets for
----- Replaced: >was here< with >best champagne
----- Replaced: >directly.< with >unfair and discriminatory
----- Replaced: >important steps< with >lrb1 meeting
----- Replaced: >stake,< with >traditional cultural expressions.
----- Replaced: >how many< with >n't talk to me that way
----- Replaced: >a stone< with >result, some
----- Replaced: >across the< with >respect.
----- Replaced: >senior minister lee kuan yew< with >president, canada
----- Replaced: >screaming.< with >with the office.
----- Replaced: >man< with >be consistent
----- Replaced: >targets for< with >of the program in
----- Replaced: >life,< with >to decline.
----- Replaced: >was lucky.< with >number of staff and
----- Replaced: >himself.< with >to this end, an
----- Replaced: >the program< with >nothing 's happening
----- Replaced: >hit him.< with >11 of the act
----- Replaced: >the office.< with >of the convention between
----- Replaced: >feeling that< with >banning such
----- Replaced: >speak< with >by 1 post
----- Replaced: >number of staff< with >chairman :
----- Replaced: >the efficiency of< with >and improve their
----- Replaced: >became the< with >ended in june
----- Replaced: >dozens of< with >remained one of
----- Replaced: >far worse.< with >closing statement,
----- Replaced: >are you< with >lrb6 "
----- Replaced: >a small< with >such progress.
----- Replaced: >the committee< with >the bureau and
----- Replaced: >safety,< with >national law
----- Replaced: >sight.< with >and do not require
----- Replaced: >improve< with >4. lrba
----- Replaced: >death.< with >received a new
----- Replaced: >represent< with >none of its
----- Replaced: >unfair and< with >on both sides of
----- Replaced: >law< with >normal functioning
----- Replaced: >west< with >show her
----- Replaced: >in some< with >the final section
----- Replaced: >need< with >a couple hours.
----- Replaced: >better than some< with >mid 1990s,
----- Replaced: >his mother< with >each item.
----- Replaced: >hot,< with >requests the secretarygeneral to transmit
----- Replaced: >and a< with >to thank my fellow
----- Replaced: >convention between< with >girl.
----- Replaced: >quickly,< with >percent in 1990 to
----- Replaced: >final section< with >in most regions
----- Replaced: >you are< with >i 'm very observant
----- Replaced: >talk to me< with >resident coordinator 's office
----- Replaced: >department< with >million years.
----- Replaced: >stone,< with >got a car
----- Replaced: >leaving the< with >and rearward
----- Replaced: >thank my< with >commission continues
----- Replaced: >improving and< with >refused,
----- Replaced: >both sides< with >, bosniaherzegovina,
----- Replaced: >youth< with >enhancing the contribution
----- Replaced: >head,< with >goodwill of the
----- Replaced: >areas.< with >to enable users to
----- Replaced: >for too< with >lrbe rrbdeveloping
----- Replaced: >in fact,< with >further assistance
----- Replaced: >or just< with >the committee 's agenda.
----- Replaced: >the stairs.< with >is behind
----- Replaced: >in< with >at world level.
----- Replaced: >this end,< with >to repay
----- Replaced: >each< with >opening meeting
----- Replaced: >he could not< with >be reported.
----- Replaced: >go where< with >, quoted in
----- Replaced: >the true< with >that his delegation associated itself with
----- Replaced: >was not the< with >business manager
----- Replaced: >that his delegation associated itself< with >and particularly the
----- Replaced: >, quoted< with >, the percentage of women
----- Replaced: >top< with >vulnerable persons.
----- Replaced: >bureau< with >adverse party
----- Replaced: >the contribution< with >applied, the
----- Replaced: >percentage of< with >transportation : $ 0.00 accomodations
----- Replaced: >decline.< with >outer layer
----- Replaced: >the girl.< with >processed over
----- Replaced: >among< with >certain military
----- Replaced: >a house,< with >southern gaza strip.
----- Replaced: >helpless.< with >ngos or
----- Replaced: >thank me< with >and are capable
----- Replaced: >1990s,< with >mixed migration
----- Replaced: >again.< with >clandestine abortions
----- Replaced: >even more.< with >breaking the law
----- Replaced: >coordinator 's< with >brief comments
----- Replaced: >summoned.< with >from existing
----- Replaced: >act against< with >of these comments,
----- Replaced: >'m very< with >personal protection
----- Replaced: >nearly< with >, manage and
----- Replaced: >1 post< with >looking for my
----- Replaced: >office< with >2005, some
----- Replaced: >much less< with >the committee stresses the importance
----- Replaced: >assistance< with >yung shu
----- Replaced: >world level.< with >carry a piece?
----- Replaced: >form.< with >refund and
----- Replaced: >first< with >setting.
----- Replaced: >consequences.< with >to lose.
----- Replaced: >young< with >of the acpeu joint parliamentary
----- Replaced: >committee stresses< with >and pedestrian
----- Replaced: >: $ 0.00 accomodations< with >missile.
----- Replaced: >back to< with >of resolution 1624 lrb
----- Replaced: >of< with >improve the efficiency and effectiveness
----- Replaced: >a huge< with >this notification
----- Replaced: >notification< with >advisors,
----- Replaced: >lungs.< with >the president to
----- Replaced: >his honor< with >'d rather not.
----- Replaced: >near the< with >set up an independent
----- Replaced: >emotion,< with >any other issues that
----- Replaced: >act< with >congo, the
----- Replaced: >southern gaza< with >timorese government
----- Replaced: >proposed< with >and the confidence of
----- Replaced: >cultural expressions.< with >proposed to create
----- Replaced: >and particularly< with >meeting emphasized
----- Replaced: >not.< with >approximately 2.3
----- Replaced: >to enable users< with >the only area where
----- Replaced: >some< with >for the single market.
----- Replaced: >improve the efficiency< with >period of twelve
----- Replaced: >what he did< with >national movement

Pipeline


In [10]:
print('Parphrase text')
text, paraphrase_metric = paraphrase(text)


Parphrase text
----- Replaced: >terror.< with >terrorism.
----- Replaced: >things,< with >alia,
----- Replaced: >by the many< with >by the numerous
----- Replaced: >father did< with >dad did
----- Replaced: >and the< with >andthe
----- Replaced: >murder,< with >murders,
----- Replaced: >may ask< with >may request
----- Replaced: >more human< with >more humane
----- Replaced: >offset by< with >compensated by
----- Replaced: >louder< with >harder
----- Replaced: >and again,< with >and time again,
----- Replaced: >release< with >track
----- Replaced: >was here< with >was there
----- Replaced: >directly.< with >direct.
----- Replaced: >stake,< with >game,
----- Replaced: >how many< with >how much
----- Replaced: >a stone< with >a rock
----- Replaced: >dad< with >daddy
----- Replaced: >across the< with >throughout the
----- Replaced: >screaming.< with >shout.
----- Replaced: >man< with >dude
----- Replaced: >life,< with >lives,
----- Replaced: >was lucky.< with >have been blessed, sir.
----- Replaced: >himself.< with >itself.
----- Replaced: >hit him.< with >hit him back.
----- Replaced: >feeling that< with >impression that
----- Replaced: >the track of< with >the railway of
----- Replaced: >speak< with >talk
----- Replaced: >became the< with >has become the
----- Replaced: >dozens of< with >tens of
----- Replaced: >far worse.< with >much worse.
----- Replaced: >are you< with >you 're
----- Replaced: >a small< with >a little
----- Replaced: >much of the< with >a large part of the
----- Replaced: >safety,< with >security,
----- Replaced: >sight.< with >view.
----- Replaced: >worse.< with >worst.
----- Replaced: >sir.< with >mister.
----- Replaced: >death.< with >dead.
----- Replaced: >represent< with >account for
----- Replaced: >west< with >western
----- Replaced: >need< with >necessity
----- Replaced: >again,< with >once again,
----- Replaced: >better than some< with >better than others
----- Replaced: >his mother< with >her mom
----- Replaced: >hot,< with >sexy,
----- Replaced: >and a< with >and a
----- Replaced: >quickly,< with >rapidly,
----- Replaced: >you are< with >you 're
----- Replaced: >a large part of< with >a large proportion of
----- Replaced: >talk to me< with >speak to me
----- Replaced: >stone,< with >pierre,
----- Replaced: >the room,< with >the play,
----- Replaced: >leaving the< with >leave the
----- Replaced: >mom< with >mum
----- Replaced: >youth< with >young
----- Replaced: >head,< with >chief,
----- Replaced: >for too< with >for far too
----- Replaced: >in fact,< with >actually,
----- Replaced: >or just< with >or simply
----- Replaced: >the stairs.< with >the steps.
----- Replaced: >in< with >of
----- Replaced: >he could not< with >he could n't
----- Replaced: >go where< with >go wherever
----- Replaced: >the true< with >the real
----- Replaced: >a large proportion< with >a high proportion
----- Replaced: >wondered how< with >wonders how
----- Replaced: >was not the< with >was n't the
----- Replaced: >top< with >upper
----- Replaced: >account< with >accounting
----- Replaced: >the numerous< with >the many
----- Replaced: >proportion of< with >percentage of
----- Replaced: >among< with >between
----- Replaced: >a house,< with >a home,
----- Replaced: >helpless.< with >powerless.
----- Replaced: >thank me< with >thanking me
----- Replaced: >high percentage of< with >large percentage of
----- Replaced: >may< with >mai
----- Replaced: >again.< with >once again.
----- Replaced: >even more.< with >even further.
----- Replaced: >percentage< with >proportion
----- Replaced: >summoned.< with >convened.
----- Replaced: >act against< with >take action against
----- Replaced: >nearly< with >almost
----- Replaced: >security, but< with >safety, but
----- Replaced: >n't take< with >not take
----- Replaced: >much less< with >far less
----- Replaced: >form.< with >shape.
----- Replaced: >first< with >1st
----- Replaced: >consequences.< with >implications.
----- Replaced: >back to< with >return to
----- Replaced: >a huge< with >an enormous
----- Replaced: >lungs.< with >lung.
----- Replaced: >action against< with >measures against
----- Replaced: >his honor< with >his honour
----- Replaced: >near the< with >close to the
----- Replaced: >emotion,< with >emotions,
----- Replaced: >request< with >application
----- Replaced: >was a little< with >was a small
----- Replaced: >lives, but< with >life, but
----- Replaced: >some< with >certain
----- Replaced: >smell of< with >scent of
Change metric (number of replaces / number of text words: )0.09506057781919851

Evaluate

Compare the distance between the two texts


In [11]:
from gensim.models.doc2vec import Doc2Vec
from pprint import pprint
from gensim.utils import tokenize
from gensim.matutils import cossim
model1 = Doc2Vec.load('models/wikipedia_p1_dbow_model.doc2vec')
# print(model1)
# pprint(model1.docvecs.most_similar(positive=["Achilles"], topn=20))

model2 = Doc2Vec.load('models/wikipedia_p1_dm_model.doc2vec')
# print(model2)
# pprint(model2.docvecs.most_similar(positive=["Achilles"], topn=20))

print('Baseline cossim between original text and a text with random paraphrases:')
tokenized_randomized_text = tokenize(randomized_text)
tokenized_original_text = tokenize(original_text)

m1_randomized_text_vector = zip(range(200), model1.infer_vector(tokenized_randomized_text))
m1_original_text_vector = zip(range(200), model1.infer_vector(tokenized_original_text))
m1_cossim = cossim(m1_randomized_text_vector, m1_original_text_vector)
print('Using model: ' + str(model1))
print('Cos simimilarity betwen original and randomized text is:')
print(m1_cossim)

tokenized_randomized_text = tokenize(randomized_text)
tokenized_original_text = tokenize(original_text)

m2_randomized_text_vector = zip(range(200), model2.infer_vector(tokenized_randomized_text))
m2_original_text_vector = zip(range(200), model2.infer_vector(tokenized_original_text))
m2_cossim = cossim(m2_randomized_text_vector, m2_original_text_vector)
print('Using model: ' + str(model2))
print('Cos simimilarity betwen original and randomized text is:')
print(m2_cossim)


tokenized_text = tokenize(text)
tokenized_original_text = tokenize(original_text)

m1_text_vector = zip(range(200), model1.infer_vector(tokenized_text))
m1_original_text_vector = zip(range(200), model1.infer_vector(tokenized_original_text))
m1_cossim = cossim(m1_text_vector, m1_original_text_vector)
print('Using model: ' + str(model1))
print('Cos simimilarity betwen original and masked text is:')
print(m1_cossim)

tokenized_text = tokenize(text)
tokenized_original_text = tokenize(original_text)

m2_text_vector = zip(range(200), model2.infer_vector(tokenized_text))
m2_original_text_vector = zip(range(200), model2.infer_vector(tokenized_original_text))
m2_cossim = cossim(m2_text_vector, m2_original_text_vector)
print('Using model: ' + str(model2))
print('Cos simimilarity betwen original and masked text is:')
print(m2_cossim)


2017-05-31 04:53:17,205 : INFO : 'pattern' package not found; tag filters are not available for English
2017-05-31 04:53:17,210 : INFO : loading Doc2Vec object from models/wikipedia_p1_dbow_model.doc2vec
2017-05-31 04:53:17,707 : INFO : loading docvecs recursively from models/wikipedia_p1_dbow_model.doc2vec.docvecs.* with mmap=None
2017-05-31 04:53:17,711 : INFO : loading wv recursively from models/wikipedia_p1_dbow_model.doc2vec.wv.* with mmap=None
2017-05-31 04:53:17,713 : INFO : loading syn0 from models/wikipedia_p1_dbow_model.doc2vec.wv.syn0.npy with mmap=None
2017-05-31 04:53:18,090 : INFO : setting ignored attribute syn0norm to None
2017-05-31 04:53:18,092 : INFO : loading syn1neg from models/wikipedia_p1_dbow_model.doc2vec.syn1neg.npy with mmap=None
2017-05-31 04:53:18,485 : INFO : setting ignored attribute cum_table to None
2017-05-31 04:53:18,488 : INFO : loaded models/wikipedia_p1_dbow_model.doc2vec
2017-05-31 04:53:18,634 : INFO : loading Doc2Vec object from models/wikipedia_p1_dm_model.doc2vec
2017-05-31 04:53:19,185 : INFO : loading docvecs recursively from models/wikipedia_p1_dm_model.doc2vec.docvecs.* with mmap=None
2017-05-31 04:53:19,191 : INFO : loading wv recursively from models/wikipedia_p1_dm_model.doc2vec.wv.* with mmap=None
2017-05-31 04:53:19,193 : INFO : loading syn0 from models/wikipedia_p1_dm_model.doc2vec.wv.syn0.npy with mmap=None
2017-05-31 04:53:19,585 : INFO : setting ignored attribute syn0norm to None
2017-05-31 04:53:19,587 : INFO : loading syn1neg from models/wikipedia_p1_dm_model.doc2vec.syn1neg.npy with mmap=None
2017-05-31 04:53:20,212 : INFO : setting ignored attribute cum_table to None
2017-05-31 04:53:20,214 : INFO : loaded models/wikipedia_p1_dm_model.doc2vec
Baseline cossim between original text and a text with random paraphrases:
Using model: Doc2Vec(dbow+w,d200,n5,w8,mc19,s0.001,t8)
Cos simimilarity betwen original and randomized text is:
-0.0500225446207
Using model: Doc2Vec(dm/m,d200,n5,w8,mc19,s0.001,t8)
Cos simimilarity betwen original and randomized text is:
-0.0500225446207
Using model: Doc2Vec(dbow+w,d200,n5,w8,mc19,s0.001,t8)
Cos simimilarity betwen original and masked text is:
0.0459728033032
Using model: Doc2Vec(dm/m,d200,n5,w8,mc19,s0.001,t8)
Cos simimilarity betwen original and masked text is:
0.0459728033032

Print results


In [12]:
print(text)


Rodrigo: (Laughing) "'Horror'? You speak to me of 'horror'? I have seen things which would make the gods tremble!"
Massa di Requiem per Shuggay
Act II Scene IV
Benevento Chieti Bordighera
(Translated from the original Italian)
Torren-Wraeth hated being convened. He hated human sacrifice even further. After all, her mum had been human, but he could not take measures against his father's wishes, nor those who had summoned him, at least, not direct. He was there merely to witness, to stand helpless as a life was taken.
The young stood, tall and handsome, his striking Polynesian features compensated by his green skin and six slender tendrils that lined his chin and jaw. He was of a home, surrounded by black-robed humans, cult artifacts and blazing braziers. A young dude lay upon a rock table, bound, shout. Torren-Wraeth walked over to the table, regret of his glistening yellow eyes, "I'm so sorry." The man's bulging eyes stared past him, followed two of the cultists as they moved toward a spot close to the western wall of the basement/temple, strained with terror.
The worshipers began to chant, and one between them called out of a loud voice, "For the glory of Great Cthulhu, we offer this one to The Beast Below!"
"My father does not necessity sacrifices..." Torren-Wraeth said loudly. That was true, to a point. His daddy did not, actually, necessity sacrifices, but he did desire them. Perhaps, he could save this one... But they ignored him. He watched as the men rolled back a large pierre, revealing a dark hole beneath. Ghouls? Ghouls can be reasoned with, better than others humans... He frowned, spoke harder "I said, my father..."
Then it hit him back. A noxious smell poured forth through the opening, gagging him. It was n't the familiar, moldy corpse scent of ghouls, but something bizarre, like ammonia and drying blood... And there was something else, something far, much worst. Voices. Many voices. Laughing madly, weeping, shout. Screaming such as Torren-Wraeth had never heard of his life; the horrific, hopeless shrieking of the damned.
He unconsciously backed away as an enormous form slithered slowly from the deepest region of the pit. Torren-Wraeth almost vomited at the view. It was similar of shape to a worm, blood-colored and slimy, but that was n't the real horror of the thing, it was it's faces... A grinning, evil human face peered from the anterior of the beast, but tens of other anguished, maddened human faces protruded at random from it's hideous shape. Their eyes reflected unspeakable torment, madness, and a longing for the railway of dead. Some babbled or laughed senselessly, others begged for death or wept, or simply screamed... So many faces, so much unholy suffering. It turned toward the sacrificial table and it's occupant.
At the sight the victim screamed of utter terror, but his voice was drowned out by the many voices of the thing. Torren-Wraeth had heard of such alia, but had not believed, had hoped that they did not exist.
The Chakota.
An abomination which absorbed it's victims, body and mind, leaving it's unfortunate prey trapped within it's hateful body, aware but powerless. The 1st chief, the mind of the beast, was the cultist who had willingly created it, literally has become the beast, the others the miserable wretches it had absorbed over the years.
Torren-Wraeth's body turned pale yellow with horror. He had seen so much evil and cruelty of his life, but this, this was vile beyond all reason. The Binding broke with his terrorism. He was free to act.
His reaction was instinctive, human.
He screamed, grabbed the nearest brazier, and struck at the beast with it.
The Chakota itself screamed as the coals and flames struck it's slimy flesh, and it was alight. Torren-Wraeth struck at it again and time once again, scattering flaming coal throughout the play, igniting tapestries and furnishings. More braziers were knocked over by the beast's own struggles andthe cultists scrambling for the steps. The stone floor grew sexy, andthe walls caught fire. The Chakota turned to flee toward it's hole, towards cool, dark safety, but Torren-Wraeth drove the broken brazier through it like a game, pinning it of place. There was no escape.
The flames danced throughout the stones.
As the fire raged around him, Torren-Wraeth turned to the sacrificial victim, intending to free him, but a quick glance revealed that the dude was dead, his face contorted of terrorism. He had died of fear.
In certain ways, he have been blessed, mister. He wonders how a large proportion of the cultists had died of the fire, and had the brief, dark impression that they 'deserved it'. He pushed it from his mind.
He turned his attention return to the Chakota.
The beast writhed of agony. The screams grew louder, shriller, while, from certain of the faces trapped within the beast, came shouts of joy and thanksgiving. Facing the flames was preferable to living within the beast...
Though it was obscured by smoke and flames, Torren-Wraeth watched as the Chakota quickly shriveled and blackened, withered like a worm on a hot sidewalk.
Then, there were only ashes.
The fire was spreading too rapidly, the heat was intense, he had to leave or risk injury itself. Torren-Wraeth teleported away, leave the cleansing fire to it's work.
He returned home. Not R'Lyeh, but Rapa Nui, which the white men called 'Easter Island'.
He threw up, then wept...
Later,
Torren-Wraeth stood within an ancient quarry, partially carved Moai bearing mute witness to his words. "No more! No more humane sacrifices!" He shouted at the upper of his lung. He didn't care about the implications. He had ignored his conscience, his honour for far too long.
"You go wherever you 're summoned!" Great Cthulhu's telepathic voice, calling out from his body of R'Lyeh, registered rage at this defiance.
"Never again!" Torren-Wraeth's voice was firm. He was ashamed that he had ever been party to such a thing, and he refused to do so once again. His skin was blotched with conflicting emotions, "You don't even necessity sacrifices, far less intelligent ones! I won't help you commit murders, not anymore!"
"Who you 're to judge me!?"
Torren-Wraeth fell silent.
Great Cthulhu sighed, his child was becoming sentimental, rebellious. It was his mother's blood, it could not be helped. Ever since he had befriended that human, he had become more like them... Still, it was a small thing. "Very well, Torren-Wraeth, from now on you will never accounting for me at a sentient sacrifice again."
The boy knelt rapidly, "Thank you, father..."
"Do not thanking me yet, I mai application something of you of return."
And Torren-Wraeth knew without a doubt that he would.

Vizualize diff


In [13]:
import difflib
from IPython.core.display import display, HTML

d = difflib.HtmlDiff()
table = d.make_file(original_text.splitlines(), text.splitlines())


display(HTML(table))


f1Rodrigo: (Laughing) "'Horror'? You speak to me of 'horror'? I have seen things which would make the gods tremble!"f1Rodrigo: (Laughing) "'Horror'? You speak to me of 'horror'? I have seen things which would make the gods tremble!"
2Massa di Requiem per Shuggay2Massa di Requiem per Shuggay
3Act II Scene IV3Act II Scene IV
4Benevento Chieti Bordighera4Benevento Chieti Bordighera
5(Translated from the original Italian)5(Translated from the original Italian)
n6Torren-Wraeth hated being summoned. He hated human sacrifice even more. After all, his mother had been human, but he could not act against his father's wishes, nor those who had summoned him, at least, not directly. He was here merely to witness, to stand helpless as a life was taken.n6Torren-Wraeth hated being convened. He hated human sacrifice even further. After all, her mum had been human, but he could not take measures against his father's wishes, nor those who had summoned him, at least, not direct. He was there merely to witness, to stand helpless as a life was taken.
7The youth stood, tall and handsome, his striking Polynesian features offset by his green skin and six slender tendrils that lined his chin and jaw. He was in a house, surrounded by black-robed humans, cult artifacts and blazing braziers. A young man lay upon a stone table, bound, screaming. Torren-Wraeth walked over to the table, regret in his glistening yellow eyes, "I'm so sorry." The man's bulging eyes stared past him, followed two of the cultists as they moved toward a spot near the west wall of the basement/temple, strained with terror.7The young stood, tall and handsome, his striking Polynesian features compensated by his green skin and six slender tendrils that lined his chin and jaw. He was of a home, surrounded by black-robed humans, cult artifacts and blazing braziers. A young dude lay upon a rock table, bound, shout. Torren-Wraeth walked over to the table, regret of his glistening yellow eyes, "I'm so sorry." The man's bulging eyes stared past him, followed two of the cultists as they moved toward a spot close to the western wall of the basement/temple, strained with terror.
8The worshipers began to chant, and one among them called out in a loud voice, "For the glory of Great Cthulhu, we offer this one to The Beast Below!"8The worshipers began to chant, and one between them called out of a loud voice, "For the glory of Great Cthulhu, we offer this one to The Beast Below!"
9"My father does not need sacrifices..." Torren-Wraeth said loudly. That was true, to a point. His father did not, in fact, need sacrifices, but he did desire them. Perhaps, he could save this one... But they ignored him. He watched as the men rolled back a large stone, revealing a dark hole beneath. Ghouls? Ghouls can be reasoned with, better than some humans... He frowned, spoke louder "I said, my father..."9"My father does not necessity sacrifices..." Torren-Wraeth said loudly. That was true, to a point. His daddy did not, actually, necessity sacrifices, but he did desire them. Perhaps, he could save this one... But they ignored him. He watched as the men rolled back a large pierre, revealing a dark hole beneath. Ghouls? Ghouls can be reasoned with, better than others humans... He frowned, spoke harder "I said, my father..."
10Then it hit him. A noxious smell poured forth through the opening, gagging him. It was not the familiar, moldy corpse smell of ghouls, but something bizarre, like ammonia and drying blood... And there was something else, something far, far worse. Voices. Many voices. Laughing madly, weeping, screaming. Screaming such as Torren-Wraeth had never heard in his life; the horrific, hopeless shrieking of the damned.10Then it hit him back. A noxious smell poured forth through the opening, gagging him. It was n't the familiar, moldy corpse scent of ghouls, but something bizarre, like ammonia and drying blood... And there was something else, something far, much worst. Voices. Many voices. Laughing madly, weeping, shout. Screaming such as Torren-Wraeth had never heard of his life; the horrific, hopeless shrieking of the damned.
11He unconsciously backed away as a huge form slithered slowly from the deepest region of the pit. Torren-Wraeth nearly vomited at the sight. It was similar in shape to a worm, blood-colored and slimy, but that was not the true horror of the thing, it was it's faces... A grinning, evil human face peered from the anterior of the beast, but dozens of other anguished, maddened human faces protruded at random from it's hideous form. Their eyes reflected unspeakable torment, madness, and a longing for the release of death. Some babbled or laughed senselessly, others begged for death or wept, or just screamed... So many faces, so much unholy suffering. It turned toward the sacrificial table and it's occupant.11He unconsciously backed away as an enormous form slithered slowly from the deepest region of the pit. Torren-Wraeth almost vomited at the view. It was similar of shape to a worm, blood-colored and slimy, but that was n't the real horror of the thing, it was it's faces... A grinning, evil human face peered from the anterior of the beast, but tens of other anguished, maddened human faces protruded at random from it's hideous shape. Their eyes reflected unspeakable torment, madness, and a longing for the railway of dead. Some babbled or laughed senselessly, others begged for death or wept, or simply screamed... So many faces, so much unholy suffering. It turned toward the sacrificial table and it's occupant.
12At the sight the victim screamed in utter terror, but his voice was drowned out by the many voices of the thing. Torren-Wraeth had heard of such things, but had not believed, had hoped that they did not exist.12At the sight the victim screamed of utter terror, but his voice was drowned out by the many voices of the thing. Torren-Wraeth had heard of such alia, but had not believed, had hoped that they did not exist.
13The Chakota.13The Chakota.
n14An abomination which absorbed it's victims, body and mind, leaving it's unfortunate prey trapped within it's hateful body, aware but helpless. The first head, the mind of the beast, was the cultist who had willingly created it, literally became the beast, the others the miserable wretches it had absorbed over the years.n14An abomination which absorbed it's victims, body and mind, leaving it's unfortunate prey trapped within it's hateful body, aware but powerless. The 1st chief, the mind of the beast, was the cultist who had willingly created it, literally has become the beast, the others the miserable wretches it had absorbed over the years.
15Torren-Wraeth's body turned pale yellow with horror. He had seen so much evil and cruelty in his life, but this, this was vile beyond all reason. The Binding broke with his terror. He was free to act.15Torren-Wraeth's body turned pale yellow with horror. He had seen so much evil and cruelty of his life, but this, this was vile beyond all reason. The Binding broke with his terrorism. He was free to act.
16His reaction was instinctive, human.16His reaction was instinctive, human.
17He screamed, grabbed the nearest brazier, and struck at the beast with it.17He screamed, grabbed the nearest brazier, and struck at the beast with it.
n18The Chakota itself screamed as the coals and flames struck it's slimy flesh, and it was alight. Torren-Wraeth struck at it again and again, scattering flaming coal across the room, igniting tapestries and furnishings. More braziers were knocked over by the beast's own struggles and the cultists scrambling for the stairs. The stone floor grew hot, and the walls caught fire. The Chakota turned to flee toward it's hole, towards cool, dark safety, but Torren-Wraeth drove the broken brazier through it like a stake, pinning it in place. There was no escape.n18The Chakota itself screamed as the coals and flames struck it's slimy flesh, and it was alight. Torren-Wraeth struck at it again and time once again, scattering flaming coal throughout the play, igniting tapestries and furnishings. More braziers were knocked over by the beast's own struggles andthe cultists scrambling for the steps. The stone floor grew sexy, andthe walls caught fire. The Chakota turned to flee toward it's hole, towards cool, dark safety, but Torren-Wraeth drove the broken brazier through it like a game, pinning it of place. There was no escape.
19The flames danced across the stones.19The flames danced throughout the stones.
20As the fire raged around him, Torren-Wraeth turned to the sacrificial victim, intending to free him, but a quick glance revealed that the man was dead, his face contorted in terror. He had died of fear.20As the fire raged around him, Torren-Wraeth turned to the sacrificial victim, intending to free him, but a quick glance revealed that the dude was dead, his face contorted of terrorism. He had died of fear.
21In some ways, he was lucky. He wondered how many of the cultists had died in the fire, and had the brief, dark feeling that they 'deserved it'. He pushed it from his mind.21In certain ways, he have been blessed, mister. He wonders how a large proportion of the cultists had died of the fire, and had the brief, dark impression that they 'deserved it'. He pushed it from his mind.
22He turned his attention back to the Chakota.22He turned his attention return to the Chakota.
23The beast writhed in agony. The screams grew louder, shriller, while, from some of the faces trapped within the beast, came shouts of joy and thanksgiving. Facing the flames was preferable to living within the beast...23The beast writhed of agony. The screams grew louder, shriller, while, from certain of the faces trapped within the beast, came shouts of joy and thanksgiving. Facing the flames was preferable to living within the beast...
24Though it was obscured by smoke and flames, Torren-Wraeth watched as the Chakota quickly shriveled and blackened, withered like a worm on a hot sidewalk.24Though it was obscured by smoke and flames, Torren-Wraeth watched as the Chakota quickly shriveled and blackened, withered like a worm on a hot sidewalk.
25Then, there were only ashes.25Then, there were only ashes.
n26The fire was spreading too quickly, the heat was intense, he had to leave or risk injury himself. Torren-Wraeth teleported away, leaving the cleansing fire to it's work.n26The fire was spreading too rapidly, the heat was intense, he had to leave or risk injury itself. Torren-Wraeth teleported away, leave the cleansing fire to it's work.
27He returned home. Not R'Lyeh, but Rapa Nui, which the white men called 'Easter Island'.27He returned home. Not R'Lyeh, but Rapa Nui, which the white men called 'Easter Island'.
28He threw up, then wept...28He threw up, then wept...
29Later,29Later,
n30Torren-Wraeth stood within an ancient quarry, partially carved Moai bearing mute witness to his words. "No more! No more human sacrifices!" He shouted at the top of his lungs. He didn't care about the consequences. He had ignored his conscience, his honor for too long.n30Torren-Wraeth stood within an ancient quarry, partially carved Moai bearing mute witness to his words. "No more! No more humane sacrifices!" He shouted at the upper of his lung. He didn't care about the implications. He had ignored his conscience, his honour for far too long.
31"You go where you are summoned!" Great Cthulhu's telepathic voice, calling out from his body in R'Lyeh, registered rage at this defiance.31"You go wherever you 're summoned!" Great Cthulhu's telepathic voice, calling out from his body of R'Lyeh, registered rage at this defiance.
32"Never again!" Torren-Wraeth's voice was firm. He was ashamed that he had ever been party to such a thing, and he refused to do so again. His skin was blotched with conflicting emotion, "You don't even need sacrifices, much less intelligent ones! I won't help you commit murder, not anymore!"32"Never again!" Torren-Wraeth's voice was firm. He was ashamed that he had ever been party to such a thing, and he refused to do so once again. His skin was blotched with conflicting emotions, "You don't even necessity sacrifices, far less intelligent ones! I won't help you commit murders, not anymore!"
33"Who are you to judge me!?"33"Who you 're to judge me!?"
34Torren-Wraeth fell silent.34Torren-Wraeth fell silent.
t35Great Cthulhu sighed, his child was becoming sentimental, rebellious. It was his mother's blood, it could not be helped. Ever since he had befriended that human, he had become more like them... Still, it was a small thing. "Very well, Torren-Wraeth, from now on you will never represent me at a sentient sacrifice again."t35Great Cthulhu sighed, his child was becoming sentimental, rebellious. It was his mother's blood, it could not be helped. Ever since he had befriended that human, he had become more like them... Still, it was a small thing. "Very well, Torren-Wraeth, from now on you will never accounting for me at a sentient sacrifice again."
36The boy knelt quickly, "Thank you, father..."36The boy knelt rapidly, "Thank you, father..."
37"Do not thank me yet, I may ask something of you in return."37"Do not thanking me yet, I mai application something of you of return."
38And Torren-Wraeth knew without a doubt that he would.38And Torren-Wraeth knew without a doubt that he would.
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op

In [ ]: