Output:
['ArgentiniaiAustralian, Canadian]
['Argentina', 'Australia', 'Canada']
Question 2: (2 marks)
Write a program to extract and print all the nouns present in the below text.
Hint: using spacy package
Example:
Input:"James works at Microsoft. She lives in Manchester and likes to play the flute."
Output:
James
Microsoft
Manchester
flute
Question 3: (3 marks)
Write a function that takes a text and a vocabulary as its arguments and returns the set of words that appear in the text and in the vocabulary. Both arguments can be represented as lists of strings.
Example:
Input:
text = 'a text and a vocabulary
vocab 'a vocabulary'
+ 100%
Zoom
Close