add python db controller; use python to retrieve each record and calculate keywords.