MCPcopy
hub / github.com/bhaskatripathi/pdfGPT / preprocess

Function preprocess

api.py:24–27  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

22
23
24def preprocess(text):
25 text = text.replace('\n', ' ')
26 text = re.sub('\s+', ' ', text)
27 return text
28
29
30def pdf_to_text(path, start_page=1, end_page=None):

Callers 1

pdf_to_textFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected