Merge pull request #14 from voltage-poppy/patch-1
typo fix: <unk> corrected to <|unk|>
This commit is contained in:
commit
62e61ae257
|
|
@ -346,7 +346,7 @@ KeyError: 'Hello'
|
||||||
|
|
||||||
<img src="../Image/chapter2/figure2.10.png" width="75%" />
|
<img src="../Image/chapter2/figure2.10.png" width="75%" />
|
||||||
|
|
||||||
现在,让我们修改词汇表,将这两个特殊token <unk> 和 <|endoftext|> 包含在内,方法是将它们添加到我们在上一节中创建的唯一单词列表中:
|
现在,让我们修改词汇表,将这两个特殊token <|unk|> 和 <|endoftext|> 包含在内,方法是将它们添加到我们在上一节中创建的唯一单词列表中:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
all_tokens = sorted(list(set(preprocessed)))
|
all_tokens = sorted(list(set(preprocessed)))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue