TSA / textInput.py
QINGCHE's picture
fix bug
0fba546
raw
history blame
378 Bytes
import run
def text_dump_to_json(text,topic_num,max_length):
lines = [x.strip() for x in text.split("\n") if x.strip()!='']
sentences = run.texClear(lines)
keys, output = run.textToAb(sentences,lines,topic_num,max_length)
keysText = "\n".join(keys)
outputText = "\n".join(output)
return keys, output
def file_dump_to_json(file):
return