add synonym check api and handle different cases in keyword extraction