Text this: An algorithm to group defects on printed circuit board for automated visual inspection