wiki:SketchEngineGadget

Sketch Engine gadget (beta)

Sketch Engine gadget is a small corpus search form which can be easily embedded in any web page by inserting the following code:

<script id="ske-gadget" src="http://beta.sketchengine.co.uk/gadget/" type="text/javascript"></script>

The following search form will be displayed:

Configuring the list of corpora

The list of corpora can be configured by specifying the corpora parameter. The value is a comma-separated list of corpus IDs. For example, the following will display the British National Corpus and ukWaC in the selection box:

<script id="ske-gadget" src="http://beta.sketchengine.co.uk/gadget/?corpora=bnc,ukwac" type="text/javascript"></script>

The unrecognised IDs are silently ignored. If none of the specified IDs is recognised, the default corpora are displayed. If a single ID is specified (recognised), the selection box is not displayed.

How do I find out what the corpus ID is?

If you open the corpus in the Sketch Engine through the Corpus Architect, look at the URL. It will look something like this:

http://beta.sketchengine.co.uk/auth/preloaded_corpus/ukwac/ske/first_form

The corpus ID is always the string which precedes /ske/, i.e. ukwac in this case.

Access privileges

By default, the gadget only offers open corpora which can be accessed by anyone. However, if you enter your own list of corpora, it might be that some visitors of your website won't have access to these corpora. With respect to the non-open corpora the system behaves in the following way:

  1. If the user can be authenticated by the IP address and the corpus is accessible by IP-authenticated users, access is granted.
  2. If the user has already logged in and has access to the corpus, access is granted.
  3. Otherwise the user is asked for a user name and password and if successfully authenticated, the requested corpus searched is performed.
  4. In all other cases access is denied.

Attachments