Predict whether a message will be starred or not in 50 bytes Given an input of a string consisting of any message from our site
chatroom taken
from the list described and linked below, output either a truthy or a falsy
value attempting to predict whether that message was starred or not in 50 bytes
or less.

You may use any truthy or falsy
values, but they must be
identical (i.e. there should only be two possible outputs, one truthy and one
falsy). The input will be given as raw HTML with newlines removed, and it may
contain non-ASCII Unicode characters. If you require input in something other
than UTF-8, please say so in your answer.

The winning submission to this challenge will be the one that predicts the
highest percentage of chat messages correctly, out of the list linked below. If
two given submissions have the same success rate, the shorter submission will
win.

Please provide instructions for running your code on the entire set of messages
and calculating the percentage correct. Ideally, this should be a bit of
boilerplate code (not counted towards your 50 bytes) that loops through the
positive test cases and outputs how many of them your code got correct and then
does the same for the negative test cases. (The overall score can then be
calculated manually via (correctPositive + correctNegative) / totalMessages.)

So that your code is reasonably testable, it must complete in 5 minutes or less
for the entire list of chat messages on reasonable modern-day hardware.

The full list of chat messages can be found
here, and it
consists of the 1000 latest starred messages as truthy test cases and the 1000
latest unstarred messages as falsy test cases. Note that there are two files in the gist; scroll about halfway down for the unstarred messages.
Retina, 50 bytes, 71.8% 72.15%

^.*([[CE;ಠ-ﭏ]|tar|ol|l.x|eo|a.u|pin|nu|o.f|"$)


Tried some regex golfing at @MartinBüttner's suggestion. This matches 704 starred messages and doesn't match 739 unstarred messages.

The ^.*( ... ) is to make sure that there is always either 0 or 1 match, since Retina outputs the number of matches by default. You can score the program on the input files by prepending m` for multiline mode, then running

Retina stars.retina &lt; starred.txt


and likewise for unstarred.txt.



Analysis / explanation

I generated the above snippets (and many more) using a program, then selected the ones I wanted manually. Here's some intuition as to why the above snippets work:


C: Matches PPCG, @CᴏɴᴏʀO'Bʀɪᴇɴ
E: Matches @ETHproductions, @El'endiaStarman
;: Because the test cases are HTML, this matches &amp;lt; and &amp;gt;
ಠ-ﭏ: Matches a range of Unicode characters, most prominently for ಠ_ಠ and @Doorknob冰
tar: Matches variations of star, @El'endiaStarman (again) and also gravatar which appears in the oneboxes posted by new posts bots
ol: Matches rel="nofollow" which is in a lot of links and oneboxes
l.x: Matches @AlexA., @trichoplax
eo: Mainly matches people, but also three cases for @Geobits
a.u: Mainly matches graduation, status, feature and abuse
pin: Matches ping and words ending in ping. Also matches a few posts in a discussion about pineapple, as an example of overfitting.
nu: Matches a mixed bag of words, the most common of which is number
o.f: Matches golf, conf(irm|use)
"$: Matches a double quote as a last character, e.g. @phase He means "Jenga."


The [ is nothing special - I just had a character left over so I figured I could use it to match one more case.