allenai / allenai/document-qa

Why is cosine distance used in document_splitter.py

Open
#35 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
435
Forks
118
PR merge metrics
No merged PRs in 30d

Description

In the method score_paragraphs(in the class ShallowOpenWebRanker) the cosine distant metric is use.
Should it not be using the dot product metric, because the cosine metric does not take into account magnitude and tfidf is direction and magnitude?
From what I can see this would be similar to saying does the paragraph contain the word and not taking into account how many times the word occurs.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.