Home > Uncategorized > English Dictionary API served with MongoDB

English Dictionary API served with MongoDB

As an exercise with the no-SQL database platform MongoDB, I created a free account on mongolabs, created a database called webtropy, and within this, created a collection with the name “dictionary”. I then downloaded a English dictionary in text format from http://www.isc.ro/en/commands/lists.html (TWL06), Importing this into Mongo was mongoimport, specifying fields as “word”.

They offer a REST API via their HTTP interface, such as:


Where “HELLO” is the word being checked. If the word is missing, i.e. “HELLOY” then the result is an empty JSON array “[]”

For the full English dictionary in JSON format, you can download this from Box.com at https://www.box.com/s/dvvuv4d6kqet4xbu7nvw

Categories: Uncategorized
  1. May 31, 2013 at 12:15 pm

    A use of this dictionary, is a javascript spell-checker:

    <script src="http://code.jquery.com/jquery-1.10.0.min.js"></script>
    <script src="mydictionary.json"></script>
    <style> #result {color:red}</style>
    <script language="javascript">
    $(document).ready(function() {
    function btnCheck_click() {
    var word = $("#tbWord").val().toUpperCase();
    var arrPos = $.inArray(word,dictionary);
    if (arrPos != -1)
    $("#result").text("It's a word!");
    $("#result").text("It's not a word!");
    Is it a word?<br>
    <input id="tbWord" type="text">
    <input type="button" id="btnCheck" value="Check"/><br>
    <span id="result"></span>


  2. August 6, 2013 at 9:14 am

    I’m now expanding this to include multiple languages using Bing Translate API. Limited to 2 Million chars per month, so it might take some time…


  3. August 15, 2013 at 3:50 pm

    The import was done using mongoimport like this: mongoimport -h ds039078.mongolab.com -d celltower -c celltower
    –type csv –file “C:\Users\Fiach\Desktop\With markers and location.csv” –head
    erline -u fiach -p xxxxxxx –port 39078


  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: