fix #304; add script to clean up ghost links between sentences