increase speed dramatically: read dictionary files once, compile regular expressions