add build_position_lexicon function