Skip to content

Commit ed7e745

Browse files
committed
#13 修正该错误
1 parent 2a56020 commit ed7e745

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@
4545
```bash
4646
pip install -r requirements.txt
4747
```
48-
3. (可选)若需要手动安装 `nltk``punkt` 数据包:
48+
3. (可选)若需要手动安装 `nltk``punkt_tab` 数据包:
4949
```bash
5050
python
5151
>>> import nltk
52-
>>> nltk.download('punkt')
52+
>>> nltk.download('punkt_tab')
5353
```
5454

5555
---

novel_generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ def advanced_split_content(content: str,
583583
"""
584584
将文本先按句子切分,然后根据语义相似度进行合并,最后根据max_length进行二次切分。
585585
"""
586-
nltk.download('punkt', quiet=True) # 确保 punkt 数据可用
586+
nltk.download('punkt_tab', quiet=True)
587587
sentences = nltk.sent_tokenize(content)
588588

589589
if not sentences:

0 commit comments

Comments
 (0)