Text this: Solving perfect matchings by frequency-grouped multi-photon events using a silicon chip