Skip to main content

No project description provided

Project description

Numbering


목표: python-docx랑 호환가능한 para_idx별 번호매기기를 모듈화

HowTo:

  1. docx파일에서 table을 제거
  2. Libreoffice를 이용해 txt로 변경
  3. 각 줄 별로 매치해 비교한다.
  4. 비교한 값이 다르다 특히 왼쪽에 있는 값이 추가되어 있다 하면 그걸 번호매기기로 인식.
  5. 번호매기기 타입이 어떤지 분석하고 결과물을 리턴
  6. 가능하다면 library로 만들어서 install 해서 사용할 수 있게 만든다

[What it can do]

Former word-processor processing libraries often fail to extract numbering info properly. Numbering can extract numbering infos and store it by each document You can use it with python-docx library

[How to use it]

from numbering import DocNumberingExtractor

num = DocNumberingExtractor('NH_전담중개업무계약서.docx')
print(num.numbering_data)


from docx import Document
doc = Document('NH_전담중개업무계약서.docx')


## if 7th paragraph has missing numbering You can combine numbering info like this!

seventh_txt = doc.paragraph[7].text
seventh_numbering = num.numbering_data['numbering']

final_text = seventh_numbering + seventh_txt

[Result]

output= { 9: { 'num_type': 'decimalEnclosedFullstop', 'num': 1, 'numbering': '1.', 'is_decimal': True }, 10: { 'num_type': 'decimalEnclosedFullstop', 'num': 2, 'numbering': '2.', 'is_decimal': True }, }

[dependancies] libreoffice 엔진 필요

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

numbering-0.1.5.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

numbering-0.1.5-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file numbering-0.1.5.tar.gz.

File metadata

  • Download URL: numbering-0.1.5.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for numbering-0.1.5.tar.gz
Algorithm Hash digest
SHA256 62ad7a0d6560ec6c58889275d98d3a5c875676709a9126f1ffceadfe192225ad
MD5 0d6d1f56e381c9ab65eb48ac3a7bfc7e
BLAKE2b-256 357411fe1f6d7b78d1515a422250ff009197a5bea16f36f4a61865d8d187ec29

See more details on using hashes here.

File details

Details for the file numbering-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: numbering-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for numbering-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 640d876349f186004eb56021b2fb28af69a56c2797aad26b1ea78ea472bb93f1
MD5 935fcab894e66d4912dd2e880bac472d
BLAKE2b-256 5480db4294ad4850cd4c351faceb8862baab2eaf3d824dc17d60745460f7a888

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page