extract_and_tag: find segments and update tag information