Guest User

Untitled

a guest
Aug 14th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.63 KB | None | 0 0
  1. Don't know / no opinion / blank
  2. Need new products / policies Lower premiums
  3. Pricing / rates are good / competitive
  4. Problems / complaints should be responded to / resolved faster
  5. Inform / up-date / explain about products / polices (existing new changes)
  6. Other
  7. Good communication / easy to reach / fast response / follow-up
  8. Good overall customer service
  9. Good variety of products / packages / benefits
  10. Should be reachable / available / responsive
  11. Trust / am confident / well established / long history
  12. Improve clarity of information / communications (in general)
  13. Not confident / not well known
  14. Not knowledgeable enough about the product
  15. Advisors should improve clarity of information / communications (in general)
  16. Friends / family do not need - have own provider
  17. Clear / easy to understand
  18. Dont recommend - too risky / dont want to influence
  19. Provide refunds if no claims were made
  20. Improve online services / capabilities
  21. Improve customer service / provide good overall service
  22. Increase awareness / visibility / not well known
  23. Should be more proactive in contacting / communicating with customers
  24. Not knowledgeable enough about the company
  25. Send statements / reports / notices more often
  26. Improve the quality / variety of products offered
  27. Dont recommend - dont discuss topic with others
  28. Need more choices / variety / better selection of products / policies
  29. Good amount of information / advice
  30. Advisors should be more proactive in contacting / communicating with customers
  31. Increase advertising / marketing / promotions
  32. Should contact clients regularly / more often
  33. Service okay / same as other providers
  34. Pricing not competitive / services charges too high
  35. Speed of processing claims
  36. Fund performance / return on investment is good / stable
  37. Good quality of online system / website
  38. Advisors should inform / up-date / explain about products / polices (existing new changes)
  39. Need better quality products / policies / better coverage
  40.  
  41. from textblob import TextBlob as tb
  42. import pandas as pd
  43. import numpy as np
  44.  
  45. data = pd.read_csv('Dataset_that_contains_these_statements.csv', encoding='ISO-8859-1') # contains a column called Statements that hold the statements above
  46.  
  47. df_new = pd.DataFrame(index=np.arange(len(doclist)), columns=['Statement', 'Polarity', 'Subjectivity', 'Score'])
  48.  
  49. doclist = data['Statements'].unique()
  50. doclist[0]=''
  51.  
  52. for i in range(len(doclist)):
  53. blob = tb(doclist[i])
  54.  
  55. df_new['Statement'][i] = doclist[i]
  56. df_new['Polarity'][i] = blob.sentiment.polarity
  57. df_new['Subjectivity'][i] = blob.sentiment.subjectivity
  58. if blob.sentiment.polarity<=0:
  59. df_new['Score'][i] = 0
  60. lif ((blob.sentiment.polarity>0) & (blob.sentiment.polarity<0.1)):
  61. df_new['Score'][i] = 1
  62. elif ((blob.sentiment.polarity>=0.1) & (blob.sentiment.polarity<0.2)):
  63. df_new['Score'][i] = 2
  64. elif ((blob.sentiment.polarity>=0.2) & (blob.sentiment.polarity<0.3)):
  65. df_new['Score'][i] = 3
  66. elif ((blob.sentiment.polarity>=0.3) & (blob.sentiment.polarity<0.4)):
  67. df_new['Score'][i] = 4
  68. elif (blob.sentiment.polarity>=0.4):
  69. df_new['Score'][i] = 5
  70.  
  71. Statement Polarity Subjectivity Score
  72.  
  73. 0 Don't know / no opinion / blank 0 0 0
  74. 1 Need new products / policies 0.136364 0.454545 0
  75. 2 Lower premiums 0 0 0
  76. 3 Pricing / rates are good / competitive 0.7 0.6 4
  77. 4 Problems / complaints should be responded to /... 0 0 0
  78. 5 Inform / up-date / explain about products / po... 0.136364 0.454545 0
  79. 6 Other -0.125 0.375 0
  80. 7 Good communication / easy to reach / fast resp... 0.444444 0.677778 3
  81. 8 Good overall customer service 0.35 0.3 2
  82. 9 Good variety of products / packages / benefits 0.7 0.6 4
  83. 10 Should be reachable / available / responsive 0.4 0.4 3
  84. 11 Trust / am confident in Sun Life / well establ... 0.225 0.616667 1
  85. 12 Improve clarity of information / communication... 0.05 0.5 0
  86. 13 Not confident in Sun Life / not well known -0.25 0.833333 0
  87. 14 Not knowledgeable enough about the product 0 0.5 0
  88. 15 Advisors should improve clarity of information... 0.05 0.5 0
  89. 16 Friends / family do not need - have own provider 0.6 1 4
  90. 17 Clear / easy to understand 0.266667 0.608333 1
  91. 18 Don't recommend - too risky / don't want to in... 0 0 0
  92. 19 Provide refunds if no claims were made 0 0 0
  93. 20 Improve online services / capabilities 0 0 0
  94. 21 Improve customer service / provide good overal... 0.35 0.3 2
  95. 22 Increase awareness / visibility for Sun Life /... 0 0 0
  96. 23 Should be more proactive in contacting / commu... 0.5 0.5 4
  97. 24 Not knowledgeable enough about the company 0 0.5 0
  98. 25 Send statements / reports / notices more often 0.5 0.5 4
  99. 26 Improve the quality / variety of products offered 0 0 0
  100. 27 Don't recommend - don't discuss topic with others 0 0 0
  101. 28 Need more choices / variety / better selection... 0.5 0.5 4
  102. 29 Good amount of information / advice 0.7 0.6 4
  103. 30 Advisors should be more proactive in contactin... 0.5 0.5 4
  104. 31 Increase Sun Life advertising / marketing / pr... 0 0 0
  105. 32 Should contact clients regularly / more often 0.5 0.5 4
  106. 33 Service okay / same as other providers 0.125 0.333333 0
  107. 34 Pricing not competitive / services charges too... 0.16 0.54 0
  108. 35 Speed of processing claims 0 0 0
  109. 36 Fund performance / return on investment is goo... 0.7 0.6 4
  110. 37 Good quality of online system / website 0.7 0.6 4
  111. 38 Advisors should inform / up-date / explain abo... 0.136364 0.454545 0
  112. 39 Need better quality products / policies / bett... 0.5 0.5 4
Add Comment
Please, Sign In to add comment