Question

In: Computer Science

Why does NLP need AI? Q2) Consider the dynamic programming (DP) approach to solve the edit...

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


Solutions

Expert Solution

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] }  


Related Solutions

why does hospital need AI and explain about the process of implementing the AI project. why...
why does hospital need AI and explain about the process of implementing the AI project. why does hospital is the best facility for choosing AI project and explain the key stakeholders in AI project implementation and its benefits.
what is the time complexity of the edit distance ("ALASKA" vs "ALABAMA" example) dynamic programming algorithm?...
what is the time complexity of the edit distance ("ALASKA" vs "ALABAMA" example) dynamic programming algorithm? what is the space complexity of the edit distance ("ALASKA" vs "ALABAMA" example) dynamic programming algorithm?
Find the edit distance between HORSE and NORTH Please give a dynamic-programming table for computing this...
Find the edit distance between HORSE and NORTH Please give a dynamic-programming table for computing this distance
Can you please solve this using recursion/ dynamic programming? Any programming language is fine. Wallace the...
Can you please solve this using recursion/ dynamic programming? Any programming language is fine. Wallace the Weightlifting Walrus is training for a contest where it will have to lift 1000 kg. Wallace has some weight plates lying around, possibly of different weights, and its goal is to add some of the plates to a bar so that it can train with a weight as close as possible to 1000 kg. In case there exist two such numbers which are equally...
Programming in C (not C++) ## Requirements Only need to edit the challenge.c You have one...
Programming in C (not C++) ## Requirements Only need to edit the challenge.c You have one function to implement: void fork_exec(char** argv): This takes in an array of strings representing arguments. The first argument is the filename of an executable (which will be given as a relative filepath, such as "./a") The remaining terms would be arguments for said executable. The array is null terminated You need to fork your process. The child needs to call exec (rather, a variant...
Solve the following problem by Dynamic Programming: Maximize z = (y1 + 2)^2 + y2 *...
Solve the following problem by Dynamic Programming: Maximize z = (y1 + 2)^2 + y2 * y3 + (y4 - 5)^2 subject to y1 + y2 + y3 + y4 <= 5 yi >= 0 and integer, i = 1, 2, 3, 4
5. Design a dynamic programming algorithm to solve the following problem. Input: An array A[1, ....
5. Design a dynamic programming algorithm to solve the following problem. Input: An array A[1, . . . , n] of positive integers, an integer K. Decide: Are there integers in A such that their sum is K. (Return T RUE or F ALSE) Example: The answer is TRUE for the array A = [1, 2, 3] and 5, since 2 + 3 = 5. The answer is FALSE for A = [2, 3, 4] and 8. Note that you...
Provide the dynamic-programming recurrence for a function that is used to solve 0-1 Knapsack. Clearly define...
Provide the dynamic-programming recurrence for a function that is used to solve 0-1 Knapsack. Clearly define what the function is computing.
Why do we need a dynamic stack and How to implement a dynamic array stack? (...
Why do we need a dynamic stack and How to implement a dynamic array stack? ( Please answer in Java)
3. Solve using probabilistic dynamic programming: I would like to sell my computer to the highest...
3. Solve using probabilistic dynamic programming: I would like to sell my computer to the highest bidder. I have studied the market, and concluded that I am likely to receive three types of offers: an offer of $200 with probability 2/7, and offer of $300 with probability 4/7, and an offer of $400 with probability 1/7. I will advertise my computer for up to three consecutive days. At the end of each of the three days, I will decide whether...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT