change SynonymDb.get to use .get rather than index
RichJackson opened this issue · comments
Richard Jackson commented
SynonymDatabase.get
should use a dictionary .get
rather than an index, so we don't have to do this where we aren't sure if the term norm is in the db (this also happens in EmbeddingIndex.search
).
However, that probably means fiddling with all the calls of .get
so that mypy is happy (probably with a cast
?) - this isn't massively important, so happy for this to be a backlog issue.
Original comment by @EFord36