Write python program
Write a program that reads from a text file "original.txt" an English paragraph such the one shown in Figure.1 and saves its word in a container called reference that keeps only the different words found in the text (e.g, the word Artificial is repeated more than one time in original.txt but reference should contain only 1 copy of the word artificial). Your progranm will then read another version of the text called misspelled.txt that contains the same text but in which several words are misspelled. Knowing that the only misspelling that occurs, is the one consisting of putting some letters of the word in wrong positions, i.e. the letters of the word are all there but some of them are in wrong positions, example the word Artificial is wrongly spelled Aritifical). Once your prog ram reads misspelled.txt, it should display for each misspelled word, the line number where it is located and possible corrections for the word. The corrections should be extracted from the container reference. The format of the expected output is shown in Figure.3 Your program must define and use at least the following functions with suitable parameters: 1. buildReference(...): that reads the contents of original.txt and saves the different words in the container reference 2. detectNcorrect (...): that reads the contents of misspelled.txt and saves the misspelled words as well as the possible corrections in an adequate container called corrections 3. proposeCorrections(...): that receives as input a single misspelled word and returns a list of possible corrections. 4. generatePermutations!.): a recursive helper function called by proposeCorrections() to generate all possible permutation of the word passed to it displayResults(..): that displays the line number of the misspelled words and the possible corrections. The results should be in the form of one misspelled word followed by its corrections in the same line Artificial intelligence (Al), sometimes called machine intelligence, is intelligence demonstrated by machines in contrast to the natural intelligence displayed by humans and other animals. In computer science A arch is defined as the study of "intelligent agents": any device that perceives its environment and takes actions that maximize its chance of successfully achieving its goals. Colloquially, the term "artificial intelligence" is applied when a machine mimics "cognitive" functions that humans associate with other human minds, such as "learning" and "problem solving" The scope of Al is disputed: as machines become increasingly capable, tasks considered as requiring ligence" are often removed from the definition, a phenomenon known as the Al effect, leading to t quip in Tesler Theorem, "Al is whatever hasn't been done yet". For instance, optical character recognition is frequently excluded from "artificial intelligence", having become a routine technology. Modern machine capabilities generally classified as Al include successfully understanding human speech, competing at the highest level in strategic game systems (such as chess and Go), autonomously operating cars, and intelligent routing in content delivery networks and military simulations. Recently, Deep Learning is a hot topic in Al. It acts as a classifier that detects objects such as cats and dogs in images and videos