@@ -21,7 +21,7 @@ class DocumentClient:
21
21
def __init__ (self , * , client_wrapper : SyncClientWrapper ):
22
22
self ._client_wrapper = client_wrapper
23
23
24
- def extract_text (
24
+ def text (
25
25
self ,
26
26
* ,
27
27
file : core .File ,
@@ -37,7 +37,7 @@ def extract_text(
37
37
See core.File for more documentation
38
38
39
39
method : typing.Optional[str]
40
- Method to use for text-only extraction.It uses a very simple pdf parser .
40
+ Method to use for text-only extraction.It uses a very simple pdf text extractor .
41
41
42
42
request_options : typing.Optional[RequestOptions]
43
43
Request-specific configuration.
@@ -54,10 +54,10 @@ def extract_text(
54
54
client = Axiomatic(
55
55
api_key="YOUR_API_KEY",
56
56
)
57
- client.document.extract_text ()
57
+ client.document.text ()
58
58
"""
59
59
_response = self ._client_wrapper .httpx_client .request (
60
- "document/extract_text " ,
60
+ "document/text " ,
61
61
method = "POST" ,
62
62
params = {
63
63
"method" : method ,
@@ -99,6 +99,7 @@ def parse(
99
99
file : core .File ,
100
100
method : typing .Optional [str ] = None ,
101
101
ocr : typing .Optional [bool ] = None ,
102
+ layout_model : typing .Optional [str ] = None ,
102
103
request_options : typing .Optional [RequestOptions ] = None ,
103
104
) -> ParseResponse :
104
105
"""
@@ -115,6 +116,9 @@ def parse(
115
116
ocr : typing.Optional[bool]
116
117
Whether to use OCR
117
118
119
+ layout_model : typing.Optional[str]
120
+ Method for layout parsing
121
+
118
122
request_options : typing.Optional[RequestOptions]
119
123
Request-specific configuration.
120
124
@@ -138,6 +142,7 @@ def parse(
138
142
params = {
139
143
"method" : method ,
140
144
"ocr" : ocr ,
145
+ "layout_model" : layout_model ,
141
146
},
142
147
data = {},
143
148
files = {
@@ -175,7 +180,7 @@ class AsyncDocumentClient:
175
180
def __init__ (self , * , client_wrapper : AsyncClientWrapper ):
176
181
self ._client_wrapper = client_wrapper
177
182
178
- async def extract_text (
183
+ async def text (
179
184
self ,
180
185
* ,
181
186
file : core .File ,
@@ -191,7 +196,7 @@ async def extract_text(
191
196
See core.File for more documentation
192
197
193
198
method : typing.Optional[str]
194
- Method to use for text-only extraction.It uses a very simple pdf parser .
199
+ Method to use for text-only extraction.It uses a very simple pdf text extractor .
195
200
196
201
request_options : typing.Optional[RequestOptions]
197
202
Request-specific configuration.
@@ -213,13 +218,13 @@ async def extract_text(
213
218
214
219
215
220
async def main() -> None:
216
- await client.document.extract_text ()
221
+ await client.document.text ()
217
222
218
223
219
224
asyncio.run(main())
220
225
"""
221
226
_response = await self ._client_wrapper .httpx_client .request (
222
- "document/extract_text " ,
227
+ "document/text " ,
223
228
method = "POST" ,
224
229
params = {
225
230
"method" : method ,
@@ -261,6 +266,7 @@ async def parse(
261
266
file : core .File ,
262
267
method : typing .Optional [str ] = None ,
263
268
ocr : typing .Optional [bool ] = None ,
269
+ layout_model : typing .Optional [str ] = None ,
264
270
request_options : typing .Optional [RequestOptions ] = None ,
265
271
) -> ParseResponse :
266
272
"""
@@ -277,6 +283,9 @@ async def parse(
277
283
ocr : typing.Optional[bool]
278
284
Whether to use OCR
279
285
286
+ layout_model : typing.Optional[str]
287
+ Method for layout parsing
288
+
280
289
request_options : typing.Optional[RequestOptions]
281
290
Request-specific configuration.
282
291
@@ -308,6 +317,7 @@ async def main() -> None:
308
317
params = {
309
318
"method" : method ,
310
319
"ocr" : ocr ,
320
+ "layout_model" : layout_model ,
311
321
},
312
322
data = {},
313
323
files = {
0 commit comments