Python Forum
I have in my arsenal python code, for the Voynich Manuscript
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I have in my arsenal python code, for the Voynich Manuscript
#1
Lightbulb 
What it does?

It takes Morse code input and outputs anagrams of any language. My problem is I would like to take input from a vord of Voynich glyphs; for the total of dots and dashes in that vord. Then process all the possible configurations for Italian anagrams from the input of the dots and dashes total.

[Image: m7i9spw8nmo31.jpg]

[Image: bh58o5adnmo31.jpg]

[Image: 2p17052hnmo31.jpg]



Here is the code I have and wrote with some aid at python io forum.
Please Reply and is it possible to implement an update to my python code?

print("Author Thomas O'Neil, copyright ver 0.1,VMS Italian Steganography Morse Code to Anagrams, August 8, 2019")

# Python program to implement Morse Code Translator 

''' 
VARIABLE KEY 
'cipher' -> 'stores the morse translated form of the english string' 
'decipher' -> 'stores the english translated form of the morse string' 
'citext' -> 'stores morse code of a single character' 
'i' -> 'keeps count of the spaces between morse characters' 
'message' -> 'stores the string to be encoded or decoded' 
'''

# Dictionary representing the morse code chart 
MORSE_CODE_DICT = { 'A':'.-', 'B':'-...', 
					'C':'-.-.', 'D':'-..', 'E':'.', 
					'F':'..-.', 'G':'--.', 'H':'....', 
					'I':'..', 'J':'.---', 'K':'-.-', 
					'L':'.-..', 'M':'--', 'N':'-.', 
					'O':'---', 'P':'.--.', 'Q':'--.-', 
					'R':'.-.', 'S':'...', 'T':'-', 
					'U':'..-', 'V':'...-', 'W':'.--', 
					'X':'-..-', 'Y':'-.--', 'Z':'--..', 
					'1':'.----', '2':'..---', '3':'...--', 
					'4':'....-', '5':'.....', '6':'-....', 
					'7':'--...', '8':'---..', '9':'----.', 
					'0':'-----', ', ':'--..--', '.':'.-.-.-', 
					'?':'..--..', '/':'-..-.', '-':'-....-', 
					'(':'-.--.', ')':'-.--.-',} 

# Function to encrypt the string 
# according to the morse code chart 
def encrypt(message): 
	cipher = '' 
	for letter in message: 
		if letter != ' ': 

			# Looks up the dictionary and adds the 
			# correspponding morse code 
			# along with a space to separate 
			# morse codes for different characters 
			cipher += MORSE_CODE_DICT[letter] + ' '
		else: 
			# 1 space indicates different characters 
			# and 2 indicates different words 
			cipher += ' '

	return cipher 

# Function to decrypt the string 
# from morse to english 
def decrypt(message): 

	# extra space added at the end to access the 
	# last morse code 
	message += ' '

	decipher = '' 
	citext = '' 
	for letter in message: 

		# checks for space 
		if (letter != ' '): 

			# counter to keep track of space 
			i = 0

			# storing morse code of a single character 
			citext += letter 

		# in case of space 
		else: 
			# if i = 1 that indicates a new character 
			i += 1

			# if i = 2 that indicates a new word 
			if i == 2 : 

				# adding space to separate words 
				decipher += ' '
			else: 

				# accessing the keys using their values (reverse of encryption) 
				decipher += list(MORSE_CODE_DICT.keys())[list(MORSE_CODE_DICT 
				.values()).index(citext)] 
				citext = '' 

	return decipher

def anagrams(word):
    """ Generate all of the anagrams of a word. """ 
    if len(word) < 2:
        yield word
    else:
        for i, letter in enumerate(word):
            if not letter in word[:i]: #avoid duplicating earlier words
                for j in anagrams(word[:i]+word[i+1:]):
                    yield j+letter
# Hard-coded driver function to run the program
while True:
        def main(): 
                
                
            message = input ("Type in Morse Code to output anagrams!: ")
            result = decrypt(message) 
            print (result)
            return result # return result
        for i in anagrams(main()):
            print (i)
            

    

                    
# Executes the main function 
if __name__ == '__main__': 
	main() 
Reply
#2
I don't know if I was clear enough regarding Morse code to anagrams using my cipher for an updated python program usage. The update would aid immensely to speed up decryption for the Voynich Manuscript. Is this too complicated for a python coder or python to actually be feasible which I have stated below.

1)I would like the output to always just be in Italian.

2)I need the code to be able to take any dot & dash input for a Voynich Vord in Morse code as long as all the dots and dashes are used.

a) Example, Input any string as long as it uses all the Morse code for a Voynich vord.

[Image: reti.jpg?w=47&zoom=2]

--.....

One of the words this example should output is, "reti" in Italian.

[Image: 2p17052hnmo31.jpg]

Any help is much appreciated for many in the Voynich Community wish to know a full disclosure of the document MS-408

Thank you,

P.S would this us a random generation filter and dictionary to rearrange the input of dashes and dots to form letters in anagrams?
Reply
#3
I'm really unclear on your question. Are you asking about how to process images?
Reply
#4
(Sep-27-2019, 05:46 PM)micseydel Wrote: I'm really unclear on your question. Are you asking about how to process images?

Hi micseydel:

My premise is that Wilfrid Voynich constructed the Voynich Manuscript some time in 1910.

This is a little complicated to describe so bear with me. I wish to take any dot dash input from Morse code (which does not necessarily have to represent a letter in Morse code) and output Italian words only. I want the code to find the letters for me and then put them together if they recognize a word in Italian. I already have python code which takes normal Morse code input and just outputs anagrams in any language. I'm not sure if anyone who aids me here needs to use an anagram engine. I wish to have this code so I can fully decode the Voynich Manuscript.

The cipher above retains the glyph relationships to the dot and dash totals which is used to build an Italian word. Here is an example. I have to admit there are some English words.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Voynich search engine in python using dashes & dot totals to find Italian words Pleiades 3 3,440 Oct-10-2019, 10:04 PM
Last Post: Pleiades

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020