Lorem Ipsum Generator
Python 3

import string
import random

with open('lorem.txt') as f:
    text = f.read()
number = eval(input("Input number: "))

dictionary = ''.join(ch for ch in text if ch not in set(string.punctuation)).split(" ")

chars = []

for word in dictionary:
    for char in word:
        chars.append(char)

chars = list(set(chars))

occurences = {}

for char in chars:
    occurences[char] = []

for word in dictionary:
   for idx, char in enumerate(word):
        try:
            occurences[char].append(word[idx+1])
        except IndexError:
            pass

lengths = [len(x) for x in dictionary]

result = ""

for _ in range(number):
    length = random.choice(lengths)
    word = random.choice(chars)
    for _ in range(length):
        try:
            word += random.choice(occurences[word[-1]])
        except IndexError: 
            break
    result += word + " "

print(result)


Takes text input through a file named lorem.txt and number of words through STDIN.

Samples:

De Finibus:


  bolute moresu xisi libospssev lolu ute tamqump Sercolimo mnci iaerue unt xptemp ptur xiui mumnsc ner citerum hiositius fun Set llu hibol etet mpesi amitap voserata mol iumol ospe pte ell asequmut


Die Verwandlung:


  Frehwauchmi «
      vo ineic venzundenwasender geitende «
      darenenserttem Semint estt Scklode
      Zur
      g ZenÂ»e Orer urd cher
      s
      Bet
      kun renaunn


Pride and Prejudice:


  paime k
      hothenoc 5
      “ 230
      erth ZZWedomincab Mrevoueim Vifedrctogei Come Kidi yol qul
      “Thant Kie Rag 41
      mf vate 12
      Eled 8
      Dathed 1
      mb Bed
      “Y merie xto zasorl h’sh ghasst Wha quce skeniat zan dishond
       othing
      hare hing din


And finally, the Magna Carta:


  wincand zisend
      s
       Pes CEFured indons fequ dindshay ranen Gofun
       OURore ibec 6248 Rofonestheasaven
      sul nthal
      232 rend
      matyont r
       uiconlicend
       ucriof 7 ashesevenye Gerd
       BEndrouse IIns jurig 20000 UREndit mandira 0000000000s
      a
      wic 47 Enccet


It's not my best work. 

All I'm doing here is some simple Markov chain recreation of the original text, with word lengths taken from a list of all lengths in the given text.  

I sort of hoped for better results, but oh well.