Hacker News new | ask | show | jobs
by rip747 3906 days ago
I imagine the main part of the algorithm will be:

weight = title.toLowerCase().indexOf("cat") < 0 ? 0 : 1000;

1 comments

Isn't it written in python?

weight = 1000 if "cat" in title.lower() else 0

Too many false positives. More like if re.search('\bcat\b')
touche my friend :)