Spaces:
Sleeping
Sleeping
Update app.py
Browse files51 unmodified lines5253545556575851 unmodified linesexcept LookupError:logging.info("NLTK 'punkt' tokenizer not found. Downloading..."); nltk.download('punkt', quiet=True); logging.info("'punkt' downloaded successfully.")def split_by_punctuation(text: str, max_len: int = 25):# (此函数不变)fragments = re.split(r'([,.:;!?。,、;:!?.…【】])', text); sentences = []temp_frag = ""51 unmodified lines5253545556575851 unmodified linesexcept LookupError:logging.info("NLTK 'punkt' tokenizer not found. Downloading..."); nltk.download('punkt', quiet=True); logging.info("'punkt' downloaded successfully.")def split_by_punctuation(text: str, max_len: int = 20):# (此函数不变)fragments = re.split(r'([,.:;!?。,、;:!?.…【】])', text); sentences = []temp_frag = ""
app.py+1-1