Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pdf-miner
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Qin Kaijie
pdf-miner
Commits
80c04ca7
Commit
80c04ca7
authored
Apr 22, 2024
by
liukaiwen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新了magic_model
parent
7da3b545
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
magic_model.py
magic_pdf/model/magic_model.py
+2
-2
No files found.
magic_pdf/model/magic_model.py
View file @
80c04ca7
...
@@ -419,7 +419,7 @@ class MagicModel:
...
@@ -419,7 +419,7 @@ class MagicModel:
page_h
=
page
.
rect
.
height
page_h
=
page
.
rect
.
height
return
page_w
,
page_h
return
page_w
,
page_h
def
__get_blocks_by_type
(
self
,
type
s
:
lis
t
,
page_no
:
int
,
extra_col
:
list
[
str
]
=
[])
->
list
:
def
__get_blocks_by_type
(
self
,
type
:
in
t
,
page_no
:
int
,
extra_col
:
list
[
str
]
=
[])
->
list
:
blocks
=
[]
blocks
=
[]
for
page_dict
in
self
.
__model_list
:
for
page_dict
in
self
.
__model_list
:
layout_dets
=
page_dict
.
get
(
"layout_dets"
,
[])
layout_dets
=
page_dict
.
get
(
"layout_dets"
,
[])
...
@@ -431,7 +431,7 @@ class MagicModel:
...
@@ -431,7 +431,7 @@ class MagicModel:
category_id
=
item
.
get
(
"category_id"
,
-
1
)
category_id
=
item
.
get
(
"category_id"
,
-
1
)
bbox
=
item
.
get
(
"bbox"
,
None
)
bbox
=
item
.
get
(
"bbox"
,
None
)
if
category_id
in
types
:
if
category_id
==
type
:
block
=
{
block
=
{
"bbox"
:
bbox
"bbox"
:
bbox
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment