Sir Syed University of Engineering & Technology: Name Roll No

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

SIR SYED UNIVERSITY OF ENGINEERING

& TECHNOLOGY

DEPARTMENT OF COMPUTER ENGINEERING

TECHNICAL WRITING & PRESENTATION SKILLS

ASSIGNMENT # 1
LITERATURE REVIEW

GROUP MEMBERS:

NAME ROLL NO

SYEDA FATIMA RIZVI 2017-CE-129

MUHAMMAD SALEEM RAZA 2017-CE-091

AREEBA SAJID 2017-CE-102

HABIB MUHAMMAD SABIR 2017-CE-084

SUBMITTED TO: MISS MAHRUKH


DATE: 9/9/2020

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

Meaning: a controversial issue or situation that is awkward or unpleasant to deal with.

Example: The subject of bullying and fighting in my school is a hot potato.

 piece of cake

Meaning: something that is easy to do

Example: Learning English is a piece of cake as long as you do it with our website.

 once in a blue moon

Meaning: very rarely

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.

 raining cats and dogs

Meaning: raining very heavily

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.

Translation (English to Urdu)

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.

‫مدد کرنے کا شکریہ! ہمیں یہاں‬


‫ایکد وسرے کی مدد کرنی ہے‬

2. Scalpel’s are very sharp. Should have taken a knife.

‫اسکیلیل بہت تیز ہیں۔ چاقو لیا تھا‬

6
3. You slit your wrist?

‫کیا آپ اپنی کالئی کو کٹے ہوئے ہیں؟‬

4. It is a conspiracy against me on your part.

‫یہ آپ کی طرف سے مجھے بڑھاوا دینے کی سازش ہے‬

5. Don't evade the subject ma'am!

‫ممبر سے بچنا مت‬

6. You have made your friend a horse, in fact a donkey.

.‫ حقیقت میں ایک گدھا ہے‬، ‫آپ نے اپنے دوست کو گھوڑا بنایا ہے‬

7. He is also performing the character of a horse in this war with everyone.

.‫وہ ہر ایک کے ساتھ اس جنگ میں گھوڑے کا کردار بھی نبھا رہا ہے‬

8. Sir the frame is awesome. Filmy! Should I capture it?

‫جناب فریم بہت اچھا ہے۔ فلمی! کیا مجھے اس پر قبضہ کرنا چاہئے؟‬

9. He came to us with the whole gang.

‫وہ پوری بارات لے کر ہمارے پاس آیا۔‬


10. We will put such a bond on this james bond that he will not be able to spy for the rest of
his life.

‫ کر پائے گا۔‬Ž‫ہم اس جیمز بانڈ پر ایسا بانڈ لگائیں گے کہ وہ ساری زندگی جاسوس نہیں‬

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 :

● are wanting to describe the syntax of basically each programing language.

● play a very important role in describing natural languages.

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.

It is possible to apply these rules independently of context.

In a context free grammar, each (production|grammar) rule has :

● 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

Rules can be applied in reverse to check if a string is grammatically correct

8
Context Free meaning

The word context-free is the duty of Chomsky and comes from the fact that the substitution of:

The left sign of =

A series derived from the right-hand expression 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 CFG consists of the following components:

● 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

Java regular expression used to parse log message at Twitter circa

^(\\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:

● ^ is a boundary meta matching the beginning of a line.

● + is a quantifier quantifying the number of occurrences

● \ is the escape character

● \d is a shorthand character classes matching digits

● \w is a shorthand character classes matching word characters (letters, digits, and


underscores)

● \s is a shorthand character classes matching whitespace (spaces, tabs, and line breaks)

Limitations and Gaps of Software Technology


Many factors contribute to the difficulty of auto translation, including words with multiple
meanings, sentences with multiple grammatical structures, uncertainty about what a pronoun
refers to, and other problems of grammar.
The current technology lacks proper solution to translating idioms because of their meaning, in
English they mean one thing but when we translate them to urdu, the translators uses it word for
word so the translation is not accurate,

Inaccuracy Using Apps or Tool


Using Google Translate App
Phrase Using App Actual
Drop-dead gorgeous ‫ڈراپ مردہ خوبصورت‬ ‫بہت خوبصورت‬

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.

Translation (steps | pass)

The translation process essentially consists of the following parts:

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.

4. Code generation: A sequence of directions obtained is generated. It is the most interested


part in general and was a split in the multi-part move.

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

You might also like