Using knowledge bases for question answering