English Dictionary – A SCILAB Module

Here is my first step towards making a digital assistant inside SCILAB. (Download)

What it does is pretty basic. It gives you the definition of any English Word you throw on it’s way.

define scilab engdict module

The most sought after feature in a digital assistant is it’s ability to tell you the meanings of words. Though it is not voice based at the moment doesn’t mean it’s any less powerful. Scilab can read and play sounds so the read-out loud functionality isn’t that far away.
I will be a little busy for the next 8 weeks so I may not get it done soon. But anyone is welcome to help with this project. I wonder where could I find some audio files for a huge vocabulary of English Language.

Anyway, here are the details of the toolbox. And wait! there’s more. After the details, I tell you how I went about making the toolbox and also some links for the source files.

Details: (Download Link: https://atoms.scilab.org/toolboxes/engdict)

Title : engdict
Type : Scilab toolbox
Version : 1.0.1
Date : 03-March-2016
Author : Manas Sharma <[email protected]>
Description : English Dictionary (gives definitions of English Words)
Licence : Creative Commons (Attribution Required)

The Making:

As soon as I got the idea to have an in-built dictionary like function in Scilab, I started thinking how am I going to get Scilab to read a dictionary and give the definitions. But then I remembered that Scilab can easily read csv files, which led me to start searching for a dictionary in a csv format.

Fortunately, other people had also posted this question on some of the popular Q&A websites. However, no one had yet put a Dictionary in a csv file. At least to my knowledge.
However, some great projects like OPTED(The Online Plain Text English Dictionary) which is based on “The Project Gutenberg Etext of Webster’s Unabridged Dictionary” which is in turn based on the 1913 US Webster’s Unabridged Dictionary (See Project Gutenburg), had compiled entire dictionary into a text file.

The biggest obstacle was now passed. Then I straight away converted the text file into a csv file, Download it here.

And started working on making Scilab read it. Since the csv I created didn’t have different columns for words and their meanings, I had to try and find a way to separate out the words from the meanings. With a few tricks from Scilab it was achieved fairly easily. Now I had a csv with the list of words and a csv with their corresponding meanings.

However, I feel the need to mention here that the process wasn’t flawless and took me quite some time to get it done perfectly. Problem was that the csv write function wasn’t functioning properly, so I couldn’t just automate the process of reading the csv files for all the alphabets and separating the words and writing them into a new csv file. Instead due to the problem I had to manually copy the words, that I had separated from the original csv, to a new csv.

Finally, when all the csv files were created I could start writing a function that would actually search for the meaning and return the definition.

And that’s how I went about making this module. If you have any question ask it in the comments section below.

Download Link: https://atoms.scilab.org/toolboxes/engdict

Here are the Source files:

Dictionary in csv

Word lists in csv

Code: define

Download Link: https://atoms.scilab.org/toolboxes/engdict




[wpedon id="7041" align="center"]

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.