CUSTOMER SERVICE ANALYTICS q

Learning Goal: I’m working on a python writing question and need an explanation and answer to help me learn.

create atoolthat allows the user to assess the linguistic properties of

major companies’ customer service tweetsYour program should first ask the user to specify
the type of analysis they would like to perform, and it should then ask the user which company
they would like to analyze. Your program should allow the user to perform an unlimited
number of analyses.

The dataset is available at https://dgoldberg.sdsu.edu/515/customer_service_tw…
and contains approximately 1,000 tweets for each of twelve major companies’ customer service
Twitter handles, listed alphabetically below:

@amazonhelp @AppleSupport @Ask_Spectrum @AskPlayStation
@comcastcares @hulu_support @SpotifyCares @sprintcare
@TMobileHelp @Uber_Support @UPSHelp @XboxSupport

The data is formatted as a JSON array. An example of the formatting is below:

[ {“Company”: “@sprintcare”, “Text”: “I understand. I would
like to assist you. We would need to get you into a private
secured link to further assist.”},

{“Company”: “@UPSHelp”, “Text”: “Hello, please click the
link to let us know how we can assist you. Click the link
to DM us with your tracking and phone number. ^E.W
https://t.co/wKJHDXWGRQ”} ]

Your tool should support the following types of analyses:

 Polarityyour tool should calculate the average sentiment polarity across that
company’s customer service tweets. Ensure that you calculate sentiment scores per
tweet rather than persentence.

 Subjectivity: your tool should calculate the average sentiment subjectivity across that
company’s customer service tweets. Ensure that you calculate sentiment scores per
tweet rather than persentence.

 Formality index: this metric is an attempt to estimate how formally or informally text is
written based upon its parts of speech (find the part of speech tagging scheme here).
Scores close to 0 reflect very informal text, and scores close to 100 reflect very formal

text. Your tool should calculate the average formality across that company’s customer
service tweets. Formality is computed as follows:

𝑓 = 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑛𝑜𝑢𝑛𝑠,𝑎𝑑𝑗𝑒𝑐𝑡𝑖𝑣𝑒𝑠,𝑝𝑟𝑒𝑝𝑜𝑠𝑖𝑡𝑖𝑜𝑛𝑠,𝑎𝑛𝑑 𝑑𝑒𝑡𝑒𝑟𝑚𝑖𝑛𝑒𝑟𝑠
𝑐 =𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑝𝑟𝑜𝑛𝑜𝑢𝑛𝑠,𝑣𝑒𝑟𝑏𝑠,𝑎𝑑𝑣𝑒𝑟𝑏𝑠,𝑎𝑛𝑑 𝑖𝑛𝑡𝑒𝑟𝑗𝑒𝑐𝑡𝑖𝑜𝑛𝑠

50( (𝑓𝑐)/(𝑓+𝑐 )+1)

For the purposes of this assignment, treat any tag that contains “NN” as a noun; any tag
that contains “JJ” as an adjective; any tag that contains “IN” as a proposition; any tag
that contains “DT” as a determiner; any tag that contains “PR” as a pronoun; any tag
that contains “VB” as a verb; any tag that contains “RB” as an adverb; and any tag that
contains “UH” as an interjection.

Write your code such that the entirety of your program is case insensitive (for example, the
program should behave equivalently if the user enters “yes”, “Yes”, or “YES” or if they enter
“@sprintcare” or “@SprintCare”). However, do not perform any spellchecking on this
assignment (unfortunately, the spellchecker we have used corrects “polarity” to “popularity”).

Some considerations as you write your code:

 Consider the possibility that, when loading the dataset, some connection issue occurs
(that is, a status code other than 200). Ensure that your code handles this case and
provides the user with a helpful printout if it does occur.

 Consider the possibility that the user enters an unsupported mode (something other
than polarity, subjectivity, or formality). In this case, print out a short warning message
and allow the user to continue analyzing data. It is also possible that the user will enter
an unsupported Twitter handle, but you do not need to handle this case for this
assignment.

 Ensure that your prompts and output are crisp, professional, and wellformatted. For
example, ensure that you have used spaces appropriately and checked your spelling.

 Adding comments in your code is encouraged. You may decide how best to comment
your code. At minimum, please use a comment at the start of your code to describe its
basic functionality.

Please use the following as a template for the tool’s expected functionality:

Welcome to the customer service analyzer!

Which analysis would you like to perform
(polarity/subjectivity/formality)? POLarity

Which Twitter handle would you like to analyze? @upshelp

@upshelp: 0.020923390993824426

Would you like to run another analysis (yes/no)? yes

Which analysis would you like to perform
(polarity/subjectivity/formality)? Subjectivity

Which Twitter handle would you like to analyze? @SPOTIFYCARES

@SPOTIFYCARES: 0.29245743199261076

Would you like to run another analysis (yes/no)? yes

Which analysis would you like to perform
(polarity/subjectivity/formality)? Formality

Which Twitter handle would you like to analyze? @xboxsupport
@xboxsupport: 59.37499613549362

Which analysis would you like to perform
(polarity/subjectivity/formality)? finances

Which Twitter handle would you like to analyze? @amazonhelp

Sorry, that type of analysis is not supported. Please try again.

Would you like to run another analysis (yes/no)? no

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more

mahjong ways 2