Skip to content

Commit

Permalink
most_similar code format
Browse files Browse the repository at this point in the history
  • Loading branch information
kduxin committed Nov 7, 2022
1 parent 1c53d2e commit f7ee0a8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion firelang/models/_fireword.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,10 @@ def field(

@torch.no_grad()
def most_similar(
self, word: str, k: int = 10, p: float = 0.3,
self,
word: str,
k: int = 10,
p: float = 0.3,
) -> List[Tuple[str, float]]:
"""Return the most similar `k` words to `word`, as well as the (frequency-adjusted) similarity scores.
Expand Down

0 comments on commit f7ee0a8

Please sign in to comment.