MCPcopy
hub / github.com/binary-husky/gpt_academic / split

Method split

crazy_functions/latex_fns/latex_actions.py:150–168  ·  view source on GitHub ↗

break down latex file to a linked list, each node use a preserve flag to indicate whether it should be proccessed by GPT. P.S. use multiprocessing to avoid timeout error

(self, txt, project_folder, opts)

Source from the content-addressed store, hash-verified

148
149
150 def split(self, txt, project_folder, opts):
151 """
152 break down latex file to a linked list,
153 each node use a preserve flag to indicate whether it should
154 be proccessed by GPT.
155 P.S. use multiprocessing to avoid timeout error
156 """
157 import multiprocessing
158 manager = multiprocessing.Manager()
159 return_dict = manager.dict()
160 p = multiprocessing.Process(
161 target=split_subprocess,
162 args=(txt, project_folder, return_dict, opts))
163 p.start()
164 p.join()
165 p.close()
166 self.nodes = return_dict['nodes']
167 self.sp = return_dict['segment_parts_for_gpt']
168 return self.sp
169
170
171class LatexPaperFileGroup():

Callers 15

decoratedFunction · 0.80
advanced_splitFunction · 0.80
mainFunction · 0.80
gen_file_previewFunction · 0.80
解析docxFunction · 0.80
解析任意code项目Function · 0.80
解析PDFFunction · 0.80
scrape_textFunction · 0.80
arxiv_downloadFunction · 0.80
pdf2tex_projectFunction · 0.80

Calls 1

closeMethod · 0.45

Tested by 5

preprocess_newbing_outFunction · 0.64
dedentMethod · 0.64
sync_and_patchMethod · 0.64