Sir Syed University of Engineering & Technology: Name Roll No
Sir Syed University of Engineering & Technology: Name Roll No
Sir Syed University of Engineering & Technology: Name Roll No
& TECHNOLOGY
ASSIGNMENT # 1
LITERATURE REVIEW
GROUP MEMBERS:
NAME ROLL NO
1
TABLE OF CONTENTS
Contents
IDIOMS........................................................................................................................................................3
PHRASES......................................................................................................................................................4
GRAMMAR..................................................................................................................................................6
CONTEXT-FREE............................................................................................................................................8
Limitations and Gaps of Software Technology...........................................................................................10
REFERENCES..............................................................................................................................................12
2
IDIOMS
Definition:
An idiom is a phrase, saying or a group of words that has a metaphorical (not literal) meaning,
which has become accepted in common usage. they provide interesting insights into the use of
words, languages and the thought processes of their speakers.
It is difficult to translate idioms from English to Urdu because of their meaning, which are
usually metaphorical
Examples:
a hot potato
piece of cake
Example: Learning English is a piece of cake as long as you do it with our website.
Example: I go to visit my grandfather only once in a blue moon; he lives in a remote farmhouse.
a bed of roses
3
Meaning: easy option
Example: Taking care of my younger sister is no bed of roses; she is very silly.
Example: I wanted to go to play outside, but it was raining cats and dogs yesterday.
PHRASES
A phrase is a gathering of words that stands all together linguistic unit, regularly as a feature of a
provision or a sentence. A phrase doesn't contain a subject and action word and, therefore, can't
pass on a total idea. A phrase diverges from a provision.
Types of Phrases
Following are types of phrase.
Noun Phrase
Adjective Phrase
Adverbial Phrase
Prepositional Phrase
Interjectional Phrase
Conjunctional Phrase
Noun Phrase
Noun phrases are gatherings of words that capacity like a thing. Ordinarily, they go about as
subjects, objects, or prepositional articles in a sentence.
Example:
Mary lives in an eclectic household.
Having been a police officer, he knew how to defend himself.
He had to sit beside the horribly angry girl.
4
Adjective Phrase
An adjective phrase is a gathering of words that depict a thing or pronoun in a sentence. An
adjective in a modifier phrase can show up toward the beginning, end, or in the phrase. The
modifier phrase can be set previously, or after, the thing or pronoun in the sentence.
Example:
Dexter had noticeably evil eyes.
The movie was not too terrible.
Your apple pie smells very tempting.
That old food tastes awfully bad.
Adverbial Phrase
An adverbial phrase is a group of words that functions as an adverb.
Example:
I will sit like a monk meditates.
Jack will sit quietly.
Near the edge
Around the sun
Prepositional Phrase
A prepositional phrase is a gathering of words comprising of a relational word, its article, and
any words that change the item.
Example:
Across many deserts
He arrived in time.
Between a rock and a hard place
After many tries
Interjectional Phrase
An interjectional is a word or phrase that is syntactically free from the words around it, and
essentially communicates feeling instead of importance.
Example:
Uh-oh, this looks bad.
5
Well, it's time to say good night.
Actually, um, it's not my dog.
Shoot. I thought I'd fixed that.
Conjunctional Phrase
A conjunctional phrase conducts the function of the conjunction.
Example:
Jeff, as well as, Tom is coming to join the party.
Be careful while climbing the hills otherwise you will fall.
Do the work as quickly as possible.
Phrase Translation
After many tries بہت سی کوششوں کے بعد
Around the sun سورج کے گرد
The movie was not too terrible. فلم زیادہ خوفناک نہیں تھی
Drop-dead gorgeous بہت خوبصورت
Once in a blue moon نہایت ہی کم
GRAMMAR
1. Thanks for the help! We have to help each other.
6
3. You slit your wrist?
. حقیقت میں ایک گدھا ہے، آپ نے اپنے دوست کو گھوڑا بنایا ہے
.وہ ہر ایک کے ساتھ اس جنگ میں گھوڑے کا کردار بھی نبھا رہا ہے
جناب فریم بہت اچھا ہے۔ فلمی! کیا مجھے اس پر قبضہ کرنا چاہئے؟
کر پائے گا۔Žہم اس جیمز بانڈ پر ایسا بانڈ لگائیں گے کہ وہ ساری زندگی جاسوس نہیں
7
CONTEXT-FREE
A context free grammar is a collection grammar rule which are describe all the possible strings
which are given in formal language without any context
They are the sort a pair of the linguistic scientist descriptive linguistics hierarchy.
Context-free grammar :
Context-free grammars area unit want to place a tree structure on strings, usually text strings. In
context-free grammars, all rules are:
● one-to-one,
● one-to-many,
● or one-to-none.
● a non-terminal symbol as its left-hand side (ie the resulting of formal language symbol
will not be appear)
● and a sequence of zero or more non-terminal and terminal symbols as its right-hand side.
Starting from a sentence reduced to one distinguished non-terminal, referred to as the goal
symbol, a given context-free grammar specifies a language, specifically the (maybe infinite) set
of double sequences of terminal symbols which will result from repeatedly substitution any non-
terminal during a sequence with the right-hand aspect of a production that the non-terminal is
that the left-hand aspect.
Grammar Checking
8
Context Free meaning
The word context-free is the duty of Chomsky and comes from the fact that the substitution of:
It is always appropriate, regardless of the context in which the symbol is contained within the
sentence.
It has turned out that this limitation on freedom of meaning (in Chomsky 's sense) is very
suitable and even attractive for programming languages.
Syntax
● a set of terminal symbols, which are the alphabet characters that appear in the grammar
generated strings.
● a set of non-terminal symbols that are placeholders for terminal symbol patterns which
can be created by non-terminal symbols.
● a set of rules for replacing (or modifying) non-terminal symbols (on the left side of the
production) in a string with other non-terminal symbols (on the right side of the
production) or terminal symbols.
● A start symbol, which is a special nonterminal symbol that appears in the grammar-
generated initial string.
Example
^(\\w+\\s+\\d+\\s+\\d+:\\d+:\\d+)\\s+
([^@]+?)@(\\s+)\\s+(\\S+):\\s+(\\S+)\\s+(\\S+)
\\s+((?:\\S+?,\\s+)*(?:\\S+?))\\s+(\\S+)\\s+(\\S+)
\\s+\\[([^\\]]+)\\]\\s+\"(\\w+)\\s+([^\"\\\\]*
(?:\\\\.[^\"\\\\]*)*)\\s+(\\S+)\"\\s+(\\S+)\\s+
9
(\\S+)\\s+\"([^\"\\\\]*(?:\\\\.[^\"\\\\]*)*)
\"\\s+\"([^\"\\\\]*(?:\\\\.[^\"\\\\]*)*)\"\\s*
(\\d*-[\\d-]*)?\\s*(\\d+)?\\s*(\\d*\\.[\\d\\.]*)?
(\\s+[-\\w]+)?.*$
where:
● \s is a shorthand character classes matching whitespace (spaces, tabs, and line breaks)
10
Using Webtran Site
Phrase Using App Actual
Once in a blue moon نہایت ہی کم ایک بار نیلے چاند میں
Implementation
In order to produce a terminal symbol string from a CFG, we start with the string consisting of
the beginning symbol, start symbol on the left-hand side and apply one production with them
also replace the start symbol right hand side of the production. Repeat the filtering procedure for
non-terminal symbols in the string and replace them with the right side of the matching output
until all non-terminal symbols have been replaced with terminal symbols.
1. Lexical analysis (Lexer): The character series of the source text is converted into a token
(language vocabulary symbols).
2. Syntax analysis (Parser)): The sequence of token is translated into a representation that
precisely mirrors the syntactic structure of the source. Checking: In addition to syntactic
rules, consistency rules (types of operators and operands) that describe the language are
checked. This process constructs as first a concrete syntax tree (CST, parse tree), and
then turn it into an abstract syntax tree (AST, syntax tree).
3. Semantic analysis. Semantic analysis is the stage in which the compiler applies the parse
tree to semantic knowledge.
5. Code_optimization:The lexer recognizes tokens which conform to the grammar and these
tokens make sense to the parser.
11
REFERENCES
https://www.theidioms.com/
https://www.urdu2eng.com/idioms.php
https://www.urduenglishdictionary.org/English-Urdu-Idioms/Idioms/Page-973.htm?
SearchType=1
https://www.learngrammar.net/
https://www.linguisticsociety.org/resource/machine-translation
https://www.youtube.com/watch?v=aK-wgYKdBVE
https://www.youtube.com/watch?v=Gaxsb9Uvwt0
https://datacadamia.com/code/compiler/context_free
https://link.springer.com/article/10.1007/BF01692511
https://download.oracle.com/docs/cd/B19306_01/server.102/b14200/ap_posix001.htm
https://docs.oracle.com/javase/9/docs/api/java/util/regex/Pattern.html
https://swtch.com/~rsc/regexp/regexp1.html
https://datacadamia.com/code/compiler/compiler
https://www.sciencedirect.com/science/article/pii/S0049237X09701041
12