Question
Sample contents of original.txt Artificial intelligence (AI), sometimes called machine intelligence, is intelligence demonstrated by machines, in contrast to the natural intelligence displayed by humans
Sample contents of original.txt
Artificial intelligence (AI), sometimes called machine intelligence, is intelligence demonstrated by machines, in contrast to the natural intelligence displayed by humans and other animals. In computer science AI research 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 AI is disputed: as machines become increasingly capable, tasks considered as requiring "intelligence" are often removed from the definition, a phenomenon known as the AI effect, leading to the quip in Tesler Theorem, "AI 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 AI 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 AI. It acts as a classifier that detects objects such as cats and dogs in images and videos
Sample contents of misspelled .txt
Aritifical intelligence (AI), somtemies called machine intelilgnece, is intelligence demonsatrted by machines, in contrast to the nautral intelligence displayed by hmuans and other anmilas. In copmutre sceince AI research is defined as the study of "intelligent agents": any device that pecreievs its enovrnimnet and takes actions that maximize its chance of successfully achieving its goals. Colloquially, the term "artificial inetllignece" is applied when a maichen mimics "cognitive" functions that humnas associate with other human minds, such as "learning" and "prbelmom solving". The scope of AI is disputed: as machines become increasingly capable, tasks considered as requiring "intelligence" are often removed from the definition, a phenomenon known as the IA effect, leading to the quip in Tesler Theorem, "IA 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 AI include successflluy understanding human speche, competing at the highest level in strategic game systems (such as chess and Go), autonomously operating cars, and intelligent routing in content delivery networsk and military simulations. Recently, Depe Learning is a hot otpic in AI. It atcs as a classifier that detects objects such as ctas and dogs in images and vdieos
Sultan Qaboos University Department of Computer Science COMP2102 Problem Solving and Programming, Fall 2018 Homework Assignment 3 Due 25 November 2018, 11:55pm Submit afile named COMP2102 FLI8 HW3 XXXXXpy containing the Python code of your solution to the problem, where XXX represents your student ID 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 program 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 program 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 proposeCorrections (...): that receives as input a single misspelled word and returns a list of possible corrections. generatePermutations (...): a recursive helper function called by proposeCorrections() to generate all possible permutation of the word passed to it. 3. 4. 5. 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 research 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 "cogive 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 "intelligence" are often removed from the definition, a phenomenon known as the Al effect, leading to the 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 Figure.1: Sample contents of original.txtStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started