Closed thiagomoeng closed 4 years ago
I assume you concatenate all paragraphs in a single text string, encode it with your question, and give the string as an input to your QA model (or pipeline). What you get back, is an answer span: indexes of the first and last character of the answer in the input text. To find a paragraph it belongs to, compute indexes of the paragraph spans in your concatenated text strings.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
❓ Questions & Help
I have a pdf extractor and from this I got a dataframe with 2 columns (sections,paragraphs). Is there any easy way to do a question and get answer like: (example) Question: "where is the book?" Answer: "It's on the bookshelf." Section: "1.2.3 The Book" Paragraph: "(Full section paragraph)"
Sorry for bad english.