Skip to content

Commit 414e56c

Browse files
committed
Page segmentation in cli
1 parent 5ca9ff9 commit 414e56c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

flclient/cli.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ def render(self, url, service_id = "FitLayout.Puppeteer", width=1200, height=800
3636
service_params.update(params)
3737
response = self.fl.invoke_artifact_service(service_id, None, service_params)
3838
return response
39+
40+
def segment(self, iri, service_id = "FitLayout.BasicAreas", params={'preserveAuxAreas': True}):
41+
"""
42+
Creates an AreaTree from an input Page artifact by applying a FitLayout segmentation service.
43+
"""
44+
response = self.fl.invoke_artifact_service(service_id, iri, params)
45+
return response
3946

4047
def export(self, art, format="turtle", output_file=None):
4148
"""

0 commit comments

Comments
 (0)