Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
def shrink(k):
return 1-1/np.exp(k)
def my_search_in_docu(sentence, docu):
wf=[]
for word in sentence.split():
wf.append((np.array(docu.split())==[word]).sum())
return shrink(np.array(wf)).mean()
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.