import run def text_dump_to_json(text): lines = [x.strip() for x in text.split("\n") if x.strip()!=''] data = {"text":lines} sentences = run.texClear(lines) keys, output = run.textToAb(sentences,lines,5,50) return keys, output def file_dump_to_json(file): return