Inspired by this rant (which listed a couple-dozen question titles with "PHP preg_replace" and nothing else useful in them)1, I figured that there may be a practical way to improve the poor title detection.
Pseudo code like this would probably work; test a title-string by:
Strip common words and frequent misspellings, EG:
a an and in the teh but not of by to too you u i with for
.Strip numbers, EG:
1234
,555.867.5309
, etc.Strip "junk words", EG:
about, code, codes, codez, error, errors, exception, exceptions, fault, faults, help, need, porblem, porblems, problem, problems, question, questions, etc.
Strip tags, EG:
php preg-replace
and tag variants, EG:preg_replace pregreplace
.
If, and only if, junk tags muck this up (it is possible for users to make most any word a tag), then only do this step for tags that have at least, say, 5 questions.Strip single-letter words, EG:
U I J T
, etc. This will also help in cleaning out the leftovers
of possessive forms (EG:PHP's
).If the resulting string does not contain any word characters (regex:
\w
), then the title fails the filter.
This should help staunch the generation of new, poor question titles.
As a bonus, also create a special review page that lists the existing questions that fail this filter.
As a super-duper bonus, create a new badge, or give some additional reward to users who edit, or correctly flag or successfully close-vote such questions.
1 This search lists a lot of very poor PHP titles, at the moment.