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.4.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.4-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: numbering-0.1.4.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.4.tar.gz
Algorithm Hash digest
SHA256 3e98d3a50d0c0a73e804933d4b93ec02b31365fd1be7657143eb861b6d32532f
MD5 3e3b19fb12c3861e92392fcfa4a8a47a
BLAKE2b-256 526873eaf0b45053000ce6e32c5422449fd5c5a0cafbc486ff2447e2b6363abb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: numbering-0.1.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 2925279b0d281736db3fa4491fdcf5a269e95601bfac5e3b4c66420c8fd3043b
MD5 9fcdaf954146c64025d4c05e2348de20
BLAKE2b-256 a22b4df6cf1b539943354f72ff08ddd3f4576c6849739af03dcfc1f48c44f90f

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