complete script for keyword matching/scoring