I would like to use Named Entity Recognition (NER) to auto summarize Airline ticket based on a given dataset.
So basically this is my dataset.
Here i need to create a summary about the details of passenger in a pdf like :
The PNR Number ____(PNRNum) refers to the passenger name ____(Name) travelling from ____(Dep Airport),____(Start Country) to ____(Arr Airport),____(End Country) starting at ____(Start Time). The flight number is ____(Flight No) which is _____(Int Dom) using _____(Cabin Class) ticket of base fare _____(Base Fare).
Here when the PNR Number should be given as input to enter in the first blank space and the corresponding data from dataset should be filled in remaining blank spaces.
airline = pd.read_csv("AIR-LINE.csv")
def create_airline_ticket():
c = canvas.Canvas('AIRlines.pdf')
c.setFont("Courier", 20)
c.drawCentredString(300, 700, 'Airline Ticket')
c.setFont("Courier", 14)
form = c.acroForm
c.drawString(10, 650, 'The PNR Number')
options = [('airline.loc[[0, 10], :]')]
form.choice(name='choice1', tooltip='Field choice1',
value='A',
x=165, y=645, width=72, height=20,
borderColor=magenta, fillColor=pink,
textColor=blue, forceBorder=True, options=options)
c.save()
I thought of using ReportLabs module in order to use listbox available in it. But it didn't go accordingly. I have to do with some other way.
So could you suggest me a step by step procedure? Since i'm a beginner in python, i could learn easily. Thanks.
Yes, I would definitely recommend SpaCy with python. The other option is StanfordNER.
I don't understand what you mean by reference? You mean if somebody else tried to do the airline ticket summarization?