MCPcopy Create free account
hub / github.com/ScienciaLAB/document-qa / process_single

Method process_single

document_qa/grobid_processors.py:228–235  ·  view source on GitHub ↗
(self, input_file)

Source from the content-addressed store, hash-verified

226 return document_object
227
228 def process_single(self, input_file):
229 doc = self.process_structure(input_file)
230
231 for paragraph in doc["passages"]:
232 entities = self.process_single_text(paragraph["text"])
233 paragraph["spans"] = entities
234
235 return doc
236
237 def parse_grobid_xml(self, text, coordinates=False):
238 """Parse GROBID TEI-XML into a structured passage dict.

Callers

nothing calls this directly

Calls 2

process_structureMethod · 0.95
process_single_textMethod · 0.80

Tested by

no test coverage detected