Law parties extractor for osp: improved algorithm