단락 제목을 검색하고 일치시킨 후 파이썬을 사용하여 단어 문서를 검색하려면 어떻게해야합니까? "1.2 Broadspectrum Offer 요약".Python에서 단락 텍스트 추출
아래의 문서를 참조하십시오. "부드러운 문서에 설명 된대로 작업 범위를 제공하겠다는 제안에 대한 요약이 아래에 나와 있습니다. 우리의 제공의 조건은 여기에 설명 된대로. 또한 비용 내역을 찾아주세요 제목 번호 변경 문서에서 문서 및이에 의존하지 않으려는 더 그래서 난 의존하려는 "
1. Executive Summary
1.1 Summary of Services
Energy Savings (Carbon Emissions and Intensity Reduction)
Upgrade Economy Cycle on Level 2,5,6,7 & 8, replace Chilled Water Valves on Level 6 & 8 and install lighting controls on L5 & 6..
1.2 Summary of Broadspectrum Offer
A summary of our Offer to deliver the Scope of Work as outlined in the tender documents is provided below. Please refer to the various terms and conditions of our Offer as detailed herein.
Please also find the cost breakdown
노트 제목의 검색 텍스트에
지금까지 문서를 검색 할 수 있지만 시작 만 할 수 있습니다.
filename1 = "North Sydney TE SP30062590-1 HVAC - Project Offer - Rev1.docx"
from docx import Document
document = Document(filename1)
for paragraph in document.paragraphs:
if 'Summary' in paragraph.text:
print paragraph.text
'1.2 요약 ...'단락 이후 문서에 아무 것도 없습니까? 그리고'Broadspectrum Offer'의'Summary'는 언제나'1.2'와 함께 쓰여질 것인가? – sadmicrowave
정규식을 작성하려면 re 라이브러리를 사용해야합니다. SO와 웹을 중심으로 광범위한 정보가 있습니다. –
아마도 도움이 될 수 있습니다. https://stackoverflow.com/questions/40388763/extracting-headings-text-from-word-doc –