Question

In: Computer Science

The application of lexical analysis techniques in spam email detection You should cover: 1) What is...

The application of lexical analysis techniques in spam email detection
You should cover:
1) What is the problem?
2) What is the compiler construction techniques used to solve the problem
3) How to solve the problem using the compiling techniques.

Solutions

Expert Solution

What is Lexical analysis?

Lexical Analysis is the absolute first stage in the compiler planning. A Lexer takes the altered source code which is written as sentences . As it were, it encourages you to change over an arrangement of characters into a succession of tokens. The lexical analyzer breaks this syntax into a progression of tokens. It eliminates any additional room or remark written in the source code.

Projects that perform lexical analysis are called lexical analyzers or lexers. A lexer contains tokenizer or scanner. On the off chance that the lexical analyzer identifies that the token is invalid, it creates a mistake. It peruses character streams from the source code, checks for lawful tokens, and pass the information to the syntax analyzer when it requests.

Lexical Analyzer

Peruses the source program, filters the info characters, bunch them into lexemes and produce the token as yield.

• Enters the recognized token into the image table.

• Strips out white spaces and remarks from source program.

• Correlates mistake messages with the source program i.e., shows blunder message with its event by determining the line number.

• Expands the macros on the off chance that it is found in the source program.

Errands of lexical analyzer can be separated into two cycles:

Scanning: Performs perusing of information characters, expulsion of white spaces and remarks.

Lexical Analysis: Produce tokens as the yield.

Need of Lexical Analyzer:

Simple design of compiler :The evacuation of white spaces and remarks empowers the punctuation analyzer for effective syntactic builds.

Compiler productivity is improved :Specialized buffering procedures for perusing characters accelerate the compiler cycle.

Compiler conveyability is upgraded

Application of lexical analysis techniques in spam email detection

The Emails have since quite a while ago become a significant stage for online crimes. Spam emails are utilized as the principle vehicle in this area. To counter this issues security network zeroed in its endeavors on creating procedures for generally boycotting of spam emails. While effective in shielding clients from known spam spaces, this methodology just takes care of a contributor to the issue. The new spam emails that jumped up everywhere on the web in masses usually get a head start in this race. In this work, we investigate a lightweight way to deal with identification and order of the spam emails as per their assault type. We show that lexical analysis is successful and productive for proactive identification of these spam emails.We likewise study the impact of the muddling methods on spam emails to make sense of the kind of confusion strategy focused at explicit sort of spam emails.

Problems in Lexical Analysis

Lexical analysis is the way toward delivering tokens from the source program. It has the accompanying issues:

  • Lookahead
  • Ambiguities
  • Lexical Errors

Lookahead :

Lookahead is needed to choose when one token will end and the following token will start. The basic model which has lookahead issues are = versus ==. Therefore an approach to depict the lexemes of every token is required.
Consequently, the quantity of lookahead to be thought of and an approach to depict the lexemes of every token is additionally required.
Normal articulations are one of the most well known methods of speaking to tokens.

Ambiguities :

The lexical analysis programs composed with lex acknowledge uncertain particulars and pick the longest match conceivable at each info point. Lex can deal with vague particulars. At the point when more than one articulation can coordinate the current information, lex picks as follows:

• The longest match is liked.

• Among rules which coordinated similar number of characters, the standard given initially is liked.

Lexical Errors :

• A character grouping that can't be examined into any legitimate token is a lexical error.

• Lexical errors are extraordinary, yet they actually should be taken care of by a scanner.

• Misspelling of identifiers, keyword, or operators are considered as lexical errors.

Typically, a lexical error is brought about by the presence of some unlawful character, generally toward the start of a token.

Problems Recovery Schemes :

• Panic mode recovery

- In panic mode recovery, unequaled examples are erased from the rest of the contribution, until the lexical analyzer can locate a very much formed token toward the start of what information is left.

• Local correction

- Source text is changed around the error point so as to get a correct book.

- Analyzer will be restarted with the resultant new content as info.

• Global correction

- It is an improved panic mode recovery.

-Preferred when local correction comes up short.

Lexical error handling methods :

Lexical errors can be taken care of by the accompanying activities:

• Deleting one character from the rest of the information.

• Inserting a missing character into the rest of the information.

• Replacing a character by another character.

• Transposing two neighboring characters.


Related Solutions

The application of lexical analysis techniques in text editor You should cover: 1) What is the...
The application of lexical analysis techniques in text editor You should cover: 1) What is the problem? 2) What is the compiler construction techniques used to solve the problem 3) How to solve the problem using the compiling techniques.
The application of lexical analysis techniques in information retrieval system You should cover: 1) What is...
The application of lexical analysis techniques in information retrieval system You should cover: 1) What is the problem? 2) What is the compiler construction techniques used to solve the problem 3) How to solve the problem using the compiling techniques.
The application of syntax analysis techniques in query processing system such as SQL You should cover:...
The application of syntax analysis techniques in query processing system such as SQL You should cover: 1) What is the problem? 2) What is the compiler construction techniques used to solve the problem 3) How to solve the problem using the compiling techniques.
What are the techniques used for business process analysis? Conduct a SWOT analysis of these techniques?...
What are the techniques used for business process analysis? Conduct a SWOT analysis of these techniques? Which techniques is appropriate for your organisation and why? with reference
Forensics Forensics is the application of investigation and analysis techniques to gather and preserve evidence from...
Forensics Forensics is the application of investigation and analysis techniques to gather and preserve evidence from a particular computing device in a way that is suitable for presentation in a court of law. It is usually on of the more interesting topics we can discuss. Take the following scenario and map out the chain of custody (in legal contexts, is the chronological documentation or paper trail that records the sequence of custody, control, transfer, analysis, and disposition of physical or...
1- How would you benefit from an application of PM techniques in a project you may...
1- How would you benefit from an application of PM techniques in a project you may have been involved with? Consider how you would define the specific tasks and their respective durations in this "project." What were the goals of the project? What con- straints were imposed on the project managers? 3- Consider the relationship between a project team and the functional parts of an organ-ization. Who should have responsibility for approving specific tasks? If an engineer- ing task goes...
Which of the following application architecture do you suggest as the best option for email for...
Which of the following application architecture do you suggest as the best option for email for an organization? Consider small, medium and large organizations to provide your suggestions. 1. Two-tier client-server 2. web-based
What factors should you consider when choosing between a console application and a GUI application?
What factors should you consider when choosing between a console application and a GUI application?
Why should the valve cover and heads surface be cleaned before you install the engine cover
Why should the valve cover and heads surface be cleaned before you install the engine cover
1)What is the advantage of solving differential equations using Laplace Transforms over prior time-domain techniques cover...
1)What is the advantage of solving differential equations using Laplace Transforms over prior time-domain techniques cover thus far this semester (Chps 1-5)? 2) When using Laplace Transforms, what is the difference in the notation between lower case (i.e. f(t)) and upper case (i.e. F(s)) letters? 3) If the Laplace Transform is an integral as shown in Sec 7.1, pg 438, equation #1, how can Dr. Tran claim that the Laplace Transform technique does not require use of Calculus? Is he...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT