A tip calculator based on restaurant receipt structure