I've been tasked with creating a Chatbot that uses the SKlearn library to create a similarity component and I've been having trouble with coding it (and honestly understanding it as a whole). I specifically have to use cosine_similarity and TfidfVectorizer to do this. Please forgive me if I'm unclear from this point on this task is no playing towards my strengths. I'll happily answer any questions.
I'm having trouble initially with my imports.
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.metrics.pairwise import cosine_similarity
I am using PyCharm and have imported the library (scikit-learn 0.23.2 0.23.2) using the software's "Python Interpreter" however the lines are greyed out which is making me think something is wrong?
Aside from this, I'm not sure what to do with my code but I thought fixing this issue is the first step.
Let me know if I need to add more information or anything at all. I'm sorry I wasn't too sure what to add to this question.
Sorry a comment made me realise I never added the results of running the code to the post https://i.stack.imgur.com/DtWKQ.jpg
I'm not sure if it's of use, but here is a screenshot as well of my Lib folder. It features scikit_learn right at the bottom https://i.stack.imgur.com/1waNh.jpg