Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

SYSTEM IMPLEMENTATION:

The backend of the proposed system is a Flask server, while the front end is an HTML website.

A.THE FRONT END LAYER:


1. INPUT: Users can send voice or type in natural language commands. The voice
recognition software that is applied here is JavaScript Web Speech API.

ALGORITHM FOR VOICE RECOGNITION:

Now, here the function named webSpeechRecognition() is made. The recognition begins when
the specific language is set. When recognition is fixed to continuous, it continues even if the
user takes a break. After recognition, the transcript is sent to the onResult event handler. The
web speech API is event based. This aids in the asynchronous processing of voice to text.
Intermediate voice recognition enables the user to receive real-time feedback.
In the input text area, users may also write natural language instructions. The command is
delivered to the Flask server after the user has entered it.
2. CODE EDITOR: The outcome of the processing is shown in a box that serves as the code
editor. The editor additionally displays the line number, cursor location, output code
and the amount of characters in each line.
In the code editor, the user may do the following things:

 Move to specific line number.


 Move the cursor to left location
 Move the cursor to right location.
These routines assist in ensuring that the output code is placed in the proper location.

B.LEXICAL ANALYSIS:
The input command is analyzed by the lexical analyzer. Followings are the measures to take:
 It is determined if the request is for "space," "open braces," "closed braces," "enter," or
"semicolon. All of these are the essential punctuations that are required for structure in
C.
 Next step is to handle the numbers. The text representation of numbers may be used
instead of the actual number in the input command. The python module word2number
takes care of this. The word2number module of python converts number text (twenty
one) to numeric number (21).
 The pre-processing method is used here. This process removes the useless words
(known as stop words) from the search engine. Example of stop words are the, a, in, an
etc. In Python, the NLTK (Natural Language Toolkit) contains a list of stop words in 16
different languages.
 The input code is analyzed to see, if there’s any keyword is present in the code or not.
These keywords are stored in the programming language. The appropriate code
structure cannot be built without a keyword, and the system will throw an internal
server error.

C.SYNTAX ANALYSIS:
The input command is tokenized first. The Averaged Perceptron Tagger of NLTK is then used
to tag sections of speech. The tags are used to generate a feature list. POS tags are used to
specify attributes such as numbers, operations, variable names, and so on. The feature list is
then delivered to the Lex file for the identified keyword after it has been produced.

D.SEMANTIC ANALYSIS:
Symbol table consists of variables and their types. So, when the user enters the variable, the
symbol table is used to validate its type.

E.CODE GENERATION:
Each Lex file contains a number of different ways to generate a sentence for a given keyword.
The feature list corresponds to one of the Lex possibilities. For each appropriate Lex match,
Yacc creates a code structure.

You might also like