Kaynağa Gözat

fix divide by zero bug (#447)

### What problem does this PR solve?

#445 

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
tags/v0.3.0
KevinHuSh 1 yıl önce
ebeveyn
işleme
962c66714e
No account linked to committer's email address
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1
    1
      deepdoc/parser/pdf_parser.py

+ 1
- 1
deepdoc/parser/pdf_parser.py Dosyayı Görüntüle

""" """


def __char_width(self, c): def __char_width(self, c):
return (c["x1"] - c["x0"]) // len(c["text"])
return (c["x1"] - c["x0"]) // max(len(c["text"]), 1)


def __height(self, c): def __height(self, c):
return c["bottom"] - c["top"] return c["bottom"] - c["top"]

Loading…
İptal
Kaydet