Implement the argument orthografos(Sentence, Correct_Sentence) which will accept a "Sentence" sentence and return the correct spelling sentence "Correct_Sentence". The "Sentence" sentence is a list of words and every word is one
list of letters.
? - orthographos ([[t, h, e], [m, o, n], [a, n, d], [t, h], [r, e, d, a], [w, m, o, a, n]], CS).
CS = [[t, h, e], [m, a, n], [a, n, d], [t, h, e], [r, e, d] [w, o, m, a , n]]
The accusation will use a dictionary of spelling words in the form of facts
word / 1 (e.g.):
word ([h, e, l, l, o]).
word ([m, a, n]).
word ([w, o, m, a, n]).
word ([b, o, o, k]).
word ([t, h, e]).
word ([c, o, m, p, u, t, e, r]).
word ([c, a, r]).
word ([p, r, o, l, o, g]).
word ([p, e, n, c, i, l]).
word ([t, a, b, l, e]).
The program should correct at least the following types of spelling errors:
1. Wrong one letter. In this case the wrong word differs from a correct spelling word in a letter, e.g. womon -> woman
2. Two-letter position exchange that is not necessarily adjacent. In this case, the correct spelling word comes from the mutual exchange of two-letter positions of the wrong spelling word, e.g. wamon -> woman
3. The existence of an extra letter. In this case the correct spelling word comes from deleting a letter of the wrong spelling word, e.g. wolman ->
4. The lack of a letter. In this case, the correct spelling word comes from adding a letter to the wrong spelling word, e.g. womn -> woman
• For each type of spelling error, implement the appropriate appropriate spell in which giving the wrong spelling word returns the correct spelling word.
• Edit the sentence words one by one, checking which of the above will lead to the correct spelling word.
Bu iş için 2 freelancer ortalamada $28 teklif veriyor
Hi, I am a software engineer experienced in Prolog (I am using SWI Prolog). I can complete your project within 1 day from awarding, properly tested and commented. I do have two questions: 1. where do the word facts Daha Fazla