This PR should close #35, as the new weight_mask allows the use of binary masks (see new tests) as well as any floating point mask, making it a general purpose weighting mechanism for post-scoring but before top-k candidate selection. At the moment only a single mask (of shape (D,) for D documents) is accepted, mainly due to infeasibility of having a (Q,D) mask when D is large. Future PRs can add support for 2-D masks.
This PR should close #35, as the new weight_mask allows the use of binary masks (see new tests) as well as any floating point mask, making it a general purpose weighting mechanism for post-scoring but before top-k candidate selection. At the moment only a single mask (of shape
(D,)
for D documents) is accepted, mainly due to infeasibility of having a(Q,D)
mask when D is large. Future PRs can add support for 2-D masks.