Approximate query answering and ranking for semantic knowledge bases