Content

English Profile Levels

If you're using the API with the dataset 'british', you might be interested to know we've improved the coverage and added a new feature, English Profile Levels to the XML.

Senses may now have 'lvl' tags (usually at 'def-info' level), with information from the English Vocabulary Profile project. This categorises words and their senses into levels according to when learners are likely to be familiar with them. While everyone's learning path is different, it is a useful way of identifying how important the word is to learn and can also be used to determine how a learner is doing.

The six levels, A1-C2 have been designed to fit with the Common European Framework of Reference for Languages (CEFR), so are comparable with levels of learning across different levels. They are based on investigations into the language students actually produce in examination, using, among other things, the Cambridge Learner Corpus, and also a growing English Profile corpus of language students are using in schools.

So from the entry paint, you can see that the sense of making a picture is very well understood by learners, but the sense of covering a room in paint may not be used by learners until a little bit later.

How will you use this new information?

Python and Ruby Wrappers

You can now access Cambridge Dictionaries Online using Python and Ruby dictionary API wrappers, so now you can bring Cambridge's English language dictionaries into your Django and Rails site.

We've also brought all our wrappers into one API Developer Resources page on this site, along with samples. You can also find other things there like the DTD for the dictionary XML, and sample CSS for styling the dictionary entries.

You'll notice our wrappers are free and open-source, provided under the terms of a 3-clause BSD license, i.e. you can use, modify and share them, provided you keep the same license.

What's a wrapper? What's a binding?

A wrapper, sometimes known as a binding, is a piece of code written in a particular language to allow other code in that language to access some other service more easily. So for example, instead of writing code to fetch data from the URLs directly, the wrapper handles all the fiddly escaping, and provides the methods in a way which is appropriate for that language. You just need to invoke the object, pointing it to CDO and giving your access key, then you can call the methods of that object (e.g. api.search("british", "slate")).

What's a DTD?

The Document Type Definition or DTD is a simple machine-readable description of the elements and attributes that are allowed or required in an XML document. We have also written human-friendly comments throughout the DTD explaining the roles of the elements. We aim to keep all our entries in line with this DTD.

What else have we been doing?

If you haven't noticed already, we've been doing some documentation fixes and we made the API specification cleaner and much easier to read.

We've also fixed a small bug in the HTML output - you should have got an email about this earlier in the month if you're registered to get an API key.

Let us know in the comments box below if you've got any problems with the wrappers or the documentation.

Ogg Support is here!

We now offer our sound files in the OGG Vorbis format as well as just MP3s.

Audio Helper script

Our view is that the HTML5 version should 'just work'. But audio in HTML makes this a bit complicated because in practice audio playback relies on user interaction, which means Javascript. It doesn't make sense to build this script into every entry, so instead, we're providing a script for you to use in your application which will play the audio files: get it here!

New DTD for XML responses

You'll notice a small change to the structure. This is what the audio looks like:

<audio region="us" type="pronunciation">
    <source type="audio/mpeg" src="http://dictionary.cambridge.org/media/british/us_pron/g/get/get__/get.mp3"/>
    <source type="audio/ogg" src="http://dictionary.cambridge.org/media/british/us_pron/g/get/get__/get.ogg"/>
</audio>

And the DTD now contains the following section on audio files:

<!-- 
    <audio> is a reference to an audio pronunciation file. 
    The region attribute indicates whether it is a UK or US pronunciation.
    The file is in the source element, which has a type attribute indicating if it is mp3 (audio/mpeg) or ogg (audio/ogg).
    The audio@caption attribute will specify exactly which word is being referred to, to avoid confusion where entries contain more than one pronunciation (e.g. for variants). It's not populated yet, we're working on that.
-->
<!ELEMENT audio (source*) >
<!ATTLIST audio 
    type (pronunciation|sound_effect) "pronunciation"
    caption CDATA #IMPLIED
    region CDATA #IMPLIED
>
<!ELEMENT source EMPTY >
<!ATTLIST source 
    type CDATA #IMPLIED
    src CDATA #IMPLIED 
>

Have fun!


Archived Articles

Designed and developed by Believe Creative