3v324v23's picture
Зафиксирована рабочая версия TEN-Agent для HuggingFace Space
87337b1
raw
history blame contribute delete
407 Bytes
import time
def get_micro_ts():
return int(time.time() * 1_000_000)
def is_punctuation(char: str):
return char in [",", ",", ".", "。", "?", "?", "!", "!"]
def parse_sentence(sentence: str, content: str):
for i, char in enumerate(content):
sentence += char
if is_punctuation(char):
return sentence, content[i + 1:], True
return sentence, "", False