Q15Single correct6 Marks28 Apr 2024
We call two sentences similar if both of them have the same number of words and satisfy the following conditions:
• The word in the first sentence has the same part of speech as the word in the second sentence, for , where L is the total number of words in either sentence.
• aList and bList are lists that contain the part of speech of words in two sentences A and B respectively.
• isSimilar is a procedure that accepts these two lists as parameters and checks for the similarity of A and B.
Choose the correct implementation of the procedure isSimilar.