code to match a string against partial or full names / keywords of entities