Sketch Engine
  • Login
  • Wiki
  • Timeline
  • View Tickets
  • New Ticket
  • Search
  • Settings

Wiki Navigation

  • Start Page
  • Index by Title
  • Index by Date
  • Last Change

Methods Documentation

back to index

General notes

The communication with the Sketch Engine works through the use of CGI queries and looks like this:

  1. create an authenticated connection to the Sketch Engine
  2. create a query that you want to work with
  3. process the output that is sent as a response

In the Examples section in the bottom of this page, there are some simple examples demonstrating how to connect the server, send a prepared query and process the output (in Java and Python). Construction of custom queries and more detailed output parsing is described in the following sections.

Creating a query

A Sketch Engine query has the following structure:

<base_url>/<method>?<attributes_and_values>

where

  • <base_url> is the path to the main CGI script, "run.cgi", e.g. http://beta.sketchengine.co.uk/auth/corpora/run.cgi for beta.
  • <method> is the particular method name, e.g. "wsketch" for word sketches. For list and documentation of all methods see the following section.
  • <attributes_and_values> is the list of attributes and values in the CGI notation, that is attribute_1=value_1;attribute_2=value_2; ... ;attribute_n=value_n .

For more detailed description of all attributes see the following section.

An example of Sketch Engine query can look like this:

http://beta.sketchengine.co.uk/auth/corpora/run.cgi/wsketch?corpname=preloaded/bnc;lemma=test;lpos=-n

It is a query that returns word sketch HTML page for corpus "preloaded/bnc", and lemma test as a noun ("lpos=-n")

back to index

Download in other formats:

  • Plain Text

Sketch Engine
Bringing Corpora to the Masses

Lexical Computing Ltd

Brought to you by
Lexical Computing Ltd