mirror of
https://github.com/wassname/Clover-Edition.git
synced 2026-10-30 12:50:18 +08:00
update
This commit is contained in:
1 parent
eb8cc5e9bb
commit
9934ab4251
1 file changed
+3
-1
+3
-1
@@ -78,7 +78,9 @@ def cut_trailing_sentence(text):
|
||||
text = standardize_punctuation(text)
|
||||
last_punc = max(text.rfind('.'), text.rfind("!"), text.rfind("?"))
|
||||
|
||||
last_punc = min(text.rfind("<|endoftext|>"), last_punc)
|
||||
et_token = text.rfind("<|endoftext|>")
|
||||
if et_token != -1:
|
||||
last_punc = min(last_punc, et_token)
|
||||
|
||||
if last_punc > 0:
|
||||
text = text[0:last_punc+1]
|
||||
|
||||
Reference in new issue
Block a user