script for saving shared top-n vectors