topic vector computation for any input