Write a program to calculate the Cosine similarity between two sentences using their corresponding bag-of-words representations provided below. Input should contain two Python lists, each of which consists of numbers. The output should be a number rounded with 4 decimals.
You can use both NumPy and SciPy libraries. Note that SciPy offers Cosine distance calculation, you need to subtract this number from 1 to it.
Example of calculation:
doc_1 = "Cosine similarity is a semantic similarity metric."
doc_2 = "Cosine similarity is not a lexical similarity metric"Their corresponding bag-of-words representations as input:
doc_1 = [1, 1, 0, 1, 0, 1, 2]
doc_2 = [1, 1, 1, 1, 1, 0, 2]The cosine similarity between them is 0.825.