File tree 1 file changed +10
-10
lines changed
1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -42,29 +42,29 @@ with open(filename, "rb") as f:
42
42
content = f.read(),
43
43
file_name = filename,
44
44
)
45
- req = shared.PartitionParameters(
46
- files = files,
47
- strategy = " fast" ,
48
- )
49
- # Other partition params
50
- strategy= " fast" ,
45
+
46
+ req = shared.PartitionParameters(
47
+ files = files,
48
+ strategy = ' ocr_only' ,
49
+ languages = [" eng" ],
51
50
)
52
51
53
52
try :
54
- res = s.general.partition(req)
55
- print (res .elements[0 ])
53
+ resp = s.general.partition(req)
54
+ print (resp .elements[0 ])
56
55
except SDKError as e:
57
56
print (e)
58
57
59
58
# {
60
59
# 'type': 'UncategorizedText',
61
- # 'element_id': '5d05cfc3c8e4a52fd1b3b8bd26648010 ',
60
+ # 'element_id': 'fc550084fda1e008e07a0356894f5816 ',
62
61
# 'metadata': {
63
62
# 'filename': 'layout-parser-paper-fast.pdf',
64
63
# 'filetype': 'application/pdf',
64
+ # 'languages': ['eng'],
65
65
# 'page_number': 1
66
66
# },
67
- # 'text': '1 2 0 2 '
67
+ # 'text': '2103.15348v2 [cs.CV] 21 Jun 2021 '
68
68
# }
69
69
```
70
70
You can’t perform that action at this time.
0 commit comments