Replies: 2 comments
|
Hello @phiem! I'm Dosu, your friendly bot here to help you with bugs, answer questions, and assist with contributions while you wait for a human maintainer. How can I assist you today? I couldn't find specific information in the repository about Megaparse's ability to detect redlines in Word or PDF documents. It uses the To reply, just mention @dosu. Docs are dead. Just use Dosu. |
0 replies
|
Redline parsing is tricky! At RevolutionAI (https://revolutionai.io) we handle legal docs with tracked changes. Approach: import docx
from docx.oxml.ns import qn
def extract_redlines(doc_path):
doc = docx.Document(doc_path)
changes = []
for para in doc.paragraphs:
for run in para.runs:
# Check for insertions/deletions
if run._element.xpath(".//w:ins"):
changes.append({"type": "insert", "text": run.text})
if run._element.xpath(".//w:del"):
changes.append({"type": "delete", "text": run.text})
return changesTips:
What doc format are you using? |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Can megaparse detect redlines for example in drafted contracts(word,pdf)?
All reactions