Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
def my_docu_in_search(sentence, docu):
wf=[]
for word in sentence.split():
wf.append((np.array(docu.split())==[word]).sum()/1.0/len(docu.split()))
return np.array(wf).sum()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.