English Dictionary: Department of Computer Engineering
English Dictionary: Department of Computer Engineering
English Dictionary
Prepared By
Submitted To
1
MAHARASHTRA STATE
BOARD OF TECHNICAL EDUCATION
Certificate
(Only for individual micro project report)
2
MAHARASHTRA STATE
BOARD OF TECHNICAL EDUCATION
Certificate
(Only for Micro Project Group report )
Place: ……………
Date: ……………
3
Annexure – I
Format for Micro-Project Proposal in about 2 to 3 pages to be submitted at end of first two weeks of
the semester
A broad distinction is made between general and specialized dictionaries. Specialized dictionaries
include words in specialist fields, rather than a complete range of words in the language. Lexical
items that describe concepts in specific fields are usually called terms instead of words, although
4
there is no consensus whether lexicology and terminology are two different fields of study. In theory,
general dictionaries are supposed[citation needed] to be semasiological, mapping word to definition,
while specialized dictionaries are supposed to be onomasiological, first identifying concepts and then
establishing the terms used to designate them. In practice, the two approaches are used for both types.
[5] There are other types of dictionaries that do not fit neatly into the above distinction, for instance
bilingual (translation) dictionaries, dictionaries of synonyms (thesauri), and rhyming dictionaries.
The word dictionary (unqualified) is usually understood to refer to a general purpose monolingual
dictionary.[6]
There is also a contrast between prescriptive or descriptive dictionaries; the former reflect what is
seen as correct use of the language while the latter reflect recorded actual use. Stylistic indications
(e.g. "informal" or "vulgar") in many modern dictionaries are also considered by some to be less than
objectively descriptive.[7]
Reference:
Program:
from tkinter import *
from tkinter import messagebox
import json
import pyttsx3
from difflib import get_close_matches
engine=pyttsx3.init()
def wordaudio():
voices = engine.getProperty('voices')
engine.setProperty('voice', voices[0].id)
engine.say(enterwordentry.get())
engine.runAndWait()
def meaningaudio():
voices = engine.getProperty('voices')
engine.setProperty('voice', voices[1].id)
engine.say(textarea.get(1.0,END))
5
engine.runAndWait()
def iexit():
res = messagebox.askyesno('Confirm', 'Do you want to exit?')
if res == True:
root.destroy()
else:
pass
def clear():
textarea.config(state=NORMAL)
enterwordentry.delete(0, END)
textarea.delete(1.0, END)
textarea.config(state=DISABLED)
def search():
data = json.load(open('data.json'))
word = enterwordentry.get()
word = word.lower()
if word in data:
meaning = data[word]
textarea.config(state=NORMAL)
textarea.delete(1.0, END)
for item in meaning:
textarea.insert(END, u'\u2022' + item + '\n\n')
textarea.config(state=DISABLED)
if res == True:
meaning = data[close_match]
textarea.delete(1.0, END)
textarea.config(state=NORMAL)
for item in meaning:
textarea.insert(END, u'\u2022' + item + '\n\n')
6
textarea.config(state=DISABLED)
else:
textarea.delete(1.0, END)
messagebox.showinfo('Information', 'Please type a correct word')
enterwordentry.delete(0, END)
else:
messagebox.showerror('Error', 'The word doesnt exist.Please double check
it.')
enterwordentry.delete(0, END)
root = Tk()
root.geometry('1000x626+100+50')
root.title('Talking Dictionary created by irfan')
root.resizable(0, 0)
bgimage = PhotoImage(file='v.png')
enterwordentry.focus_set()
searchimage = PhotoImage(file='search.png')
searchButton = Button(root, image=searchimage, bd=0, bg='whitesmoke',
activebackground='whitesmoke', cursor='hand2',
command=search)
searchButton.place(x=620, y=150)
micimage = PhotoImage(file='mic.png')
micButton = Button(root, image=micimage, bd=0, bg='whitesmoke',
activebackground='whitesmoke',
cursor='hand2',command=wordaudio)
micButton.place(x=710, y=153)
7
meaninglabel.place(x=580, y=240)
audioimage = PhotoImage(file='microphone.png')
audioButton = Button(root, image=audioimage, bd=0, bg='whitesmoke',
activebackground='whitesmoke',
cursor='hand2',command=meaningaudio)
audioButton.place(x=530, y=555)
clearimage = PhotoImage(file='clear.png')
clearButton = Button(root, image=clearimage, bd=0, bg='whitesmoke',
activebackground='whitesmoke', cursor='hand2'
, command=clear)
clearButton.place(x=660, y=555)
exitimage = PhotoImage(file='exit.png')
exitButton = Button(root, image=exitimage, bd=0, bg='whitesmoke',
activebackground='whitesmoke', cursor='hand2',
command=iexit)
exitButton.place(x=790, y=555)
root.mainloop()
5.0 Resources Required (major resources like raw material, tools, software etc.)
S. No. Name of Resource/material Specifications Qty Remarks
1 laptop Microsoft word
2 operating system Windows 10
6.0 Action Plan (Sequence and time required for major activities for 8 Weeks)
S. No. Details of activity Planned Planned Name of
Start date Finish date Responsible Team
Members
1 Discussion and finalization of topic All members
2 Preparation of submission of All members
proposal
3 Planning layout of micro project All members
4 Content preparation All members
5 Discussion about required resources All members
6 Create the report All members
7 Final submission of project All members
8
**************
Annexure – II
PART B – Micro-Project Report
Title of Micro-Project
1.0 Rationale
Dictionary in Python is an unordered collection of data values, used to store data values like
a map, which unlike other Data Types that hold only single value as an element, Dictionary
holds key:value pair. Key value is provided in the dictionary to make it more optimized. Each key-
value pair in a Dictionary is separated by a colon :, whereas each key is separated by a ‘comma’.
A Dictionary in Python works similar to the Dictionary in a real world. Keys of a Dictionary must
be unique and of immutable data type such as Strings, Integers, and tuples, but the key-values can
be repeated and be of any type.
In this micro-project we will prepare a GUI for an English Dictionary.
We are going to create GUI using tkinter module the GUI having search bar to search words and it
has display area to show its meaning.
We use the method json to read and load data from Json file that contains word definitions.
We use method pyttsx for text-to-speech functionality to enable the program to speak the word and
meaning.
We use method difflib to find close matches for words that are not found in the dictionary and to
provide suggestions to the user.
A broad distinction is made between general and specialized dictionaries. Specialized dictionaries
include words in specialist fields, rather than a complete range of words in the language. Lexical
9
items that describe concepts in specific fields are usually called terms instead of words, although
there is no consensus whether lexicology and terminology are two different fields of study. In theory,
general dictionaries are supposed[citation needed] to be semasiological, mapping word to definition,
while specialized dictionaries are supposed to be onomasiological, first identifying concepts and then
establishing the terms used to designate them. In practice, the two approaches are used for both types.
[5] There are other types of dictionaries that do not fit neatly into the above distinction, for instance
bilingual (translation) dictionaries, dictionaries of synonyms (thesauri), and rhyming dictionaries.
The word dictionary (unqualified) is usually understood to refer to a general purpose monolingual
dictionary.[6]
There is also a contrast between prescriptive or descriptive dictionaries; the former reflect what is
seen as correct use of the language while the latter reflect recorded actual use. Stylistic indications
(e.g. "informal" or "vulgar") in many modern dictionaries are also considered by some to be less than
objectively descriptive.[7]
Reference:
engine=pyttsx3.init()
def wordaudio():
voices = engine.getProperty('voices')
engine.setProperty('voice', voices[0].id)
engine.say(enterwordentry.get())
engine.runAndWait()
def meaningaudio():
voices = engine.getProperty('voices')
engine.setProperty('voice', voices[1].id)
engine.say(textarea.get(1.0,END))
engine.runAndWait()
10
def iexit():
res = messagebox.askyesno('Confirm', 'Do you want to exit?')
if res == True:
root.destroy()
else:
pass
def clear():
textarea.config(state=NORMAL)
enterwordentry.delete(0, END)
textarea.delete(1.0, END)
textarea.config(state=DISABLED)
def search():
data = json.load(open('data.json'))
word = enterwordentry.get()
word = word.lower()
if word in data:
meaning = data[word]
textarea.config(state=NORMAL)
textarea.delete(1.0, END)
for item in meaning:
textarea.insert(END, u'\u2022' + item + '\n\n')
textarea.config(state=DISABLED)
if res == True:
meaning = data[close_match]
textarea.delete(1.0, END)
textarea.config(state=NORMAL)
for item in meaning:
textarea.insert(END, u'\u2022' + item + '\n\n')
textarea.config(state=DISABLED)
11
else:
textarea.delete(1.0, END)
messagebox.showinfo('Information', 'Please type a correct word')
enterwordentry.delete(0, END)
else:
messagebox.showerror('Error', 'The word doesnt exist.Please double check
it.')
enterwordentry.delete(0, END)
root = Tk()
root.geometry('1000x626+100+50')
root.title('Talking Dictionary created by irfan')
root.resizable(0, 0)
bgimage = PhotoImage(file='v.png')
enterwordentry.focus_set()
searchimage = PhotoImage(file='search.png')
searchButton = Button(root, image=searchimage, bd=0, bg='whitesmoke',
activebackground='whitesmoke', cursor='hand2',
command=search)
searchButton.place(x=620, y=150)
micimage = PhotoImage(file='mic.png')
micButton = Button(root, image=micimage, bd=0, bg='whitesmoke',
activebackground='whitesmoke',
cursor='hand2',command=wordaudio)
micButton.place(x=710, y=153)
12
textarea = Text(root, font=('arial', 18, 'bold'), height=8, width=34, bd=8,
relief=GROOVE, wrap='word')
textarea.place(x=460, y=300)
audioimage = PhotoImage(file='microphone.png')
audioButton = Button(root, image=audioimage, bd=0, bg='whitesmoke',
activebackground='whitesmoke',
cursor='hand2',command=meaningaudio)
audioButton.place(x=530, y=555)
clearimage = PhotoImage(file='clear.png')
clearButton = Button(root, image=clearimage, bd=0, bg='whitesmoke',
activebackground='whitesmoke', cursor='hand2'
, command=clear)
clearButton.place(x=660, y=555)
exitimage = PhotoImage(file='exit.png')
exitButton = Button(root, image=exitimage, bd=0, bg='whitesmoke',
activebackground='whitesmoke', cursor='hand2',
command=iexit)
exitButton.place(x=790, y=555)
root.mainloop()
13
7.0 Skill Developed / learning out of this Micro-Project
In this project we learned how to create a python English dictionary.
In this project we learnt about various libraries like pyttsx3,Tkinter.
We also learned how to add json files in python file.
**************
14
Annexure – III
15
S. Characteristic Poor Average Good Excellent
No to be assessed ( Marks 1-3 ) ( Marks 4 - 5 ) ( Marks 6 - 8 ) ( Marks 9- 10 )
.
charts and graphs.
6 Report Very short, poor Nearly sufficient Detailed, correct Very detailed,
Preparation quality sketches, and correct details and clear correct, clear
Details about about methods, description of description of
methods, material, methods, methods,
material, precautions and materials, materials,
precaution and conclusion, but precautions and precautions and
conclusions clarity is not there Conclusions. conclusions.
omitted, some in presentation. Sufficient Graphic Enough tables,
details are wrong But not enough Description. charts and sketches
graphic
description.
16
MIcro-Project Evaluation Sheet
Note:
Every course teacher is expected to assign marks for group evolution for each group of students in first 3
columns as per rubrics & individual evaluation in 4TH column for each group of students as per rubrics based
on viva.
Signature………………………………………………………………………………
Date:………………………..
17