Error while using ner.match for pattern matching

Yey! This works :woman_genie: . Thank you @ines.
I have 2 questions following this:

  1. is there a way tho write these matches to a jsonl file without getting to the interface? (I do not see a “–output” argument.)

  2. I would like to remove the overlapping spans and keep only the longest span. For example on the interface I get “PS-21” suggested once and “PS-21 slips” once and “slips” once. I just want to keep “PS-21 slips”.

From spacy matching i checked the output jsonl file and and removed the overlapping spans with writing a function. is there something that will consider only the longest match?