Moved get_weight from scheduler to parser to make parser independent