From b4a6ead907a8247d8c599f3ba2cda406e400bc95 Mon Sep 17 00:00:00 2001 From: Ishan Anand Date: Tue, 3 Sep 2024 13:48:35 -0700 Subject: [PATCH] Fix minor comment typo in encoder.py Replaced "haved" with "have" for grammatical correctness to improve readability of the comment. --- src/encoder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/encoder.py b/src/encoder.py index 5f52e723c..a40f75819 100644 --- a/src/encoder.py +++ b/src/encoder.py @@ -49,7 +49,7 @@ def __init__(self, encoder, bpe_merges, errors='replace'): self.bpe_ranks = dict(zip(bpe_merges, range(len(bpe_merges)))) self.cache = {} - # Should haved added re.IGNORECASE so BPE merges can happen for capitalized versions of contractions + # Should have added re.IGNORECASE so BPE merges can happen for capitalized versions of contractions self.pat = re.compile(r"""'s|'t|'re|'ve|'m|'ll|'d| ?\p{L}+| ?\p{N}+| ?[^\s\p{L}\p{N}]+|\s+(?!\S)|\s+""") def bpe(self, token):