LiRI Wiki

Linguistic Research Infrastructure - University of Zurich

User Tools

Site Tools


langtech:swissdox:api

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
langtech:swissdox:api [2023/03/22 15:58] – created johannes.graen.uzh.chlangtech:swissdox:api [2023/04/13 16:08] (current) Klaus Rothenhäusler
Line 14: Line 14:
 The query is defined using a YAML format. Optional arguments are query name, comment, expiration date and a flag to specifiy whether the query should be run or not (for syntax checking). Below you find a simple example in Python for submitting a query using the API. The query is defined using a YAML format. Optional arguments are query name, comment, expiration date and a flag to specifiy whether the query should be run or not (for syntax checking). Below you find a simple example in Python for submitting a query using the API.
  
-<code python>+<code python swissdox_submit_query.py>
 import requests import requests
  
Line 31: Line 31:
         dates:         dates:
             - from: 2022-12-01             - from: 2022-12-01
-                to: 2022-12-31+              to: 2022-12-31
         languages:         languages:
             - de             - de
Line 84: Line 84:
 It is possible to check the status of all submitted queries, as well as status of a certain query with a specific id. The following example shows how to list all submitted queries with their respective statuses: It is possible to check the status of all submitted queries, as well as status of a certain query with a specific id. The following example shows how to list all submitted queries with their respective statuses:
  
-<code python>+<code python swissdox_status.py>
 import requests import requests
  
Line 106: Line 106:
 When you were checking status of your query (like shown in the example above), you also got a download URL in a response, for those queries which are completed. By using this URL in an API request you are able to download your dataset: When you were checking status of your query (like shown in the example above), you also got a download URL in a response, for those queries which are completed. By using this URL in an API request you are able to download your dataset:
  
-<code python>+<code python swissdox_download.py>
 import requests import requests
  
langtech/swissdox/api.1679500708.txt.gz · Last modified: by johannes.graen.uzh.ch

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki