Python Forum
Text Summarization CSV File
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Text Summarization CSV File
#1
HI All,

I have a CSV file with 100+ rows of text. These text are conversation between a person and chat bot. I need to create a summary of each line item separately.While i am able to do a summary on a text file using gensim package however as each line item is a distinct conversation hence i cannot create a corpus of all these documents. While this text file is just 100 off the final data is from a server which rolls in thousands hence running each summary separately is also a very cumbersome approach. Kindly suggest as i am not figure out to run it on csv data:
Below

[import gensim
from gensim.summarization import summarize



my_text = "Customer: My name is Jerrie. Agent: Hello Jerrie, how are you doing? Customer: I have been checking online with your website and you have number of different offers for credit card and balance transfer offers and purchase offers and i feel as a loyal customer i should be offer that but I haven’t been and i just don’t think it is very fair and its quite frustrating . Agent: okay let me check that for you . Agent: I certainly understand your frustrations Mrs. Coles. What I can offer you is to be transferred over to our platinum card it has number of benefits . 0% intro new purchases offer – 28 Months. 0% intro balance transfer offer last for 18 Months. 0% on Overseas Purchase. 0% Cash Fee for FOREX : Post Office Travel Money . Customer: Okay and do I need to do different things in regards to that or how would I get started with the process?. Agent: No I can process this all for you after this you will be able to process the balance transfer. Customer: Okay. Agent: okay thank you for calling, Is there anything else I may help you with?"



my_text.split() # split each word
len(my_text.split()) # find total words
my_text.split()



summarize(my_text)

# Set the Amount you want to summarise
#default is 20%
a= summarize(my_text, ratio=0.5)
len(a)

# We can also ask to summarise at the number of words rather than ratio
summarize(my_text, word_count=80)
]
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  I need Turkish Text Summarization (I need roadmap) Prusa 1 1,735 Aug-30-2021, 07:35 PM
Last Post: Larz60+
  is this file an ASCII text file? Skaperen 5 3,679 Nov-08-2019, 08:44 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020