AI-Powered Text Analysis: Sonnets and Doublets Project
VerifiedAdded on 2025/08/19
|9
|569
|130
AI Summary
Desklib provides solved assignments and past papers for students.

Table of Contents
Introduction.................................................................................................................................................2
Part 1:..........................................................................................................................................................3
Pseudo code:............................................................................................................................................3
Demonstration of code:...........................................................................................................................3
Python code:............................................................................................................................................4
Output:.....................................................................................................................................................5
Part 2:..........................................................................................................................................................6
Pseudo Code:...........................................................................................................................................6
Demonstration of code:...........................................................................................................................6
Python code:............................................................................................................................................7
Output:.....................................................................................................................................................8
Conclusion:.................................................................................................................................................9
Figure 1.......................................................................................................................................................4
Figure 2.......................................................................................................................................................5
Figure 3.......................................................................................................................................................5
Figure 4.......................................................................................................................................................7
Figure 5.......................................................................................................................................................8
Introduction.................................................................................................................................................2
Part 1:..........................................................................................................................................................3
Pseudo code:............................................................................................................................................3
Demonstration of code:...........................................................................................................................3
Python code:............................................................................................................................................4
Output:.....................................................................................................................................................5
Part 2:..........................................................................................................................................................6
Pseudo Code:...........................................................................................................................................6
Demonstration of code:...........................................................................................................................6
Python code:............................................................................................................................................7
Output:.....................................................................................................................................................8
Conclusion:.................................................................................................................................................9
Figure 1.......................................................................................................................................................4
Figure 2.......................................................................................................................................................5
Figure 3.......................................................................................................................................................5
Figure 4.......................................................................................................................................................7
Figure 5.......................................................................................................................................................8
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

Introduction
This task is to check python abilities for giving two issues identified with Sonnets and Doublets.
Doublets have stepping stool of words that contain few words and each word has changed with
just one record an incentive at each worth and arrive at last End string or worth. Sonnet are
sonnets that have bunches of words containing letters, string, and sentences. So we have errand
to finish all issue which characterizes in this task. Works have three errands that need to realize
what number of letters in given record and recurrence of each word.
This task is to check python abilities for giving two issues identified with Sonnets and Doublets.
Doublets have stepping stool of words that contain few words and each word has changed with
just one record an incentive at each worth and arrive at last End string or worth. Sonnet are
sonnets that have bunches of words containing letters, string, and sentences. So we have errand
to finish all issue which characterizes in this task. Works have three errands that need to realize
what number of letters in given record and recurrence of each word.

Part A:
Pseudo-code:
I. To begin with, import all bundles and read record and passed them in circle.
II. Run circle till document end string.
III. Make the counter factor and check the event of words and set in List variable
IV. Print entire rundown
V. Passed entire record variable in Counter class
VI. Access entire Dictionary utilizing a key-esteem structure utilizing circle till part of the
arrangement
VII. 7 Sorted the record utilizing in manufacture capacities.
VIII. End
Demonstration:
Peruse the document and go in circle and keep running till record is done. Utilizing loop-variable
attach all words length to compute single word two words and three-word letter and print it
utilizing loop-variable in type of key and worth. For estimation of all word’s recurrence, passed
full record with connected split func, in class. So we have to import accumulations bundle and
call it collection & Dot operator.it will return lexicon with words and its recurrence. So print all
information utilizing print work.
Pseudo-code:
I. To begin with, import all bundles and read record and passed them in circle.
II. Run circle till document end string.
III. Make the counter factor and check the event of words and set in List variable
IV. Print entire rundown
V. Passed entire record variable in Counter class
VI. Access entire Dictionary utilizing a key-esteem structure utilizing circle till part of the
arrangement
VII. 7 Sorted the record utilizing in manufacture capacities.
VIII. End
Demonstration:
Peruse the document and go in circle and keep running till record is done. Utilizing loop-variable
attach all words length to compute single word two words and three-word letter and print it
utilizing loop-variable in type of key and worth. For estimation of all word’s recurrence, passed
full record with connected split func, in class. So we have to import accumulations bundle and
call it collection & Dot operator.it will return lexicon with words and its recurrence. So print all
information utilizing print work.
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

Code Screenshot:
Figure 1: Sonnets code
Figure 1: Sonnets code
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

Output Sceenshot:
Figure 2: Screenshot
Figure 3: Screenshot
Figure 2: Screenshot
Figure 3: Screenshot

Part B:
Pseudo Code:
I. Peruse the record and passed it in func which returns all word content document.
II. We need words length, so make work which returns length of each word and store in
rundown.
III. Make a func to Store all part word with conceivable split.
IV. Make a strategy to Store all conceivable next words in Default dict.
V. Make Method which orchestrates given rundown of doublets.
VI. Make a technique that makes stepping stool of words and essentially takes beginning and
completion string which changes each list letter individually till the part of the bargain
target string is accomplished.
VII. Print work
VIII. End
Demonstration:
To begin with, make a func() which make expressions of rundown. Connected Split func
connecting word split. Make length func and work which have usefulness to return length
everything being equal and utilized strip() work in this code. Connected for circle and ordering
all words in given rundown. Add all words from default lexicon and return it. Func() takes a
contention with beginning and end string which makes stepping stool of words, a loop is applied
toward the part of the arrangement changes all ' I ' esteem individually when last file whenever
established .it will proceed with when target string is accomplished.
Pseudo Code:
I. Peruse the record and passed it in func which returns all word content document.
II. We need words length, so make work which returns length of each word and store in
rundown.
III. Make a func to Store all part word with conceivable split.
IV. Make a strategy to Store all conceivable next words in Default dict.
V. Make Method which orchestrates given rundown of doublets.
VI. Make a technique that makes stepping stool of words and essentially takes beginning and
completion string which changes each list letter individually till the part of the bargain
target string is accomplished.
VII. Print work
VIII. End
Demonstration:
To begin with, make a func() which make expressions of rundown. Connected Split func
connecting word split. Make length func and work which have usefulness to return length
everything being equal and utilized strip() work in this code. Connected for circle and ordering
all words in given rundown. Add all words from default lexicon and return it. Func() takes a
contention with beginning and end string which makes stepping stool of words, a loop is applied
toward the part of the arrangement changes all ' I ' esteem individually when last file whenever
established .it will proceed with when target string is accomplished.
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

Code:
Figure 4
Figure 4
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

Output:
Figure 5
Figure 5

Conclusion:
This program is effectively run. Poems and Doubles are two issues fathomed in this task.
The program of Sonnet & Doublet issue in python. The screen capture of the code and
yield is joined in this report document.
This program is effectively run. Poems and Doubles are two issues fathomed in this task.
The program of Sonnet & Doublet issue in python. The screen capture of the code and
yield is joined in this report document.
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide
1 out of 9
Related Documents
Your All-in-One AI-Powered Toolkit for Academic Success.
+13062052269
info@desklib.com
Available 24*7 on WhatsApp / Email
Unlock your academic potential
Copyright © 2020–2026 A2Z Services. All Rights Reserved. Developed and managed by ZUCOL.