In: Computer Science
Why does NLP need AI?
Q2) Consider the dynamic programming (DP) approach to solve the edit distant problem, in which the distant between two strings are calculated by
?(?,?)=min{?(?−1,?)+1,
?(?,?−1)+1,
?(?−1,?−1)+?(?,?),
where ?(?,?)=2, if the corresponding letters are not matching, and ?(?,?)=0, if they are matching.
Apply this DP approach to compute the edit distance in the following example.
Y
3
A
2
P
1
#
0
1
2
3
4
#
P
L
A
Y
Q3) Given the automaton on the right for derivational rules. Show the transition paths for the following words:
computerization
NLP simply stands for Natural Language processing , it is the branch of Artificial Intelligence which deals with the interaction between Human with Computer by the help of Natural language processing. The main goal of NLP is to understand the human Language and read or write and process them to get as input in form of text and return output.
some of the Advance Natural Language processing library Like SPACY etc.
Sol.2 > EDIT DISTANCE Dynamic programming concept and Solution
Here we comapre both character in string if both have same character then we can copy the diagonal value of the table like : if(S1[i]==S2[j]) then D[i][j]=D[i-1][j-1]
else if both strings have different characters the we will consider the minimum among left value ,right value and Diagonal value lik this : if(s1[i] !=s2[j]) then D[i][j]=min{ D[i-1][j] , D[i-1][j-1] , D[i][j-1] }