[Prolog] Very Simple orthographic script

Kapalı İlan edilme: 4 yıl önce Teslim sırasında ödenir
Kapalı Teslim sırasında ödenir

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.

Example usage:

? - 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 ->

woman

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

Suggestions

• 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.

Prolog

Proje NO: #21264291

Proje hakkında

1 teklif Uzak proje Aktif 4 yıl önce

Bu iş için 1 freelancer ortalamada $30 teklif veriyor

BeshoyMousaKhair

hi , it's not a difficult task and i can do it , thanks in advance .....................................................

$30 AUD in 7 gün içinde
(3 Değerlendirme)
2.3