Self learning url filter
<p>I need to classify given urls as porn or non porn via python script (not by visiting them in person and watching videos) and I thought about calculating porn probability for each url by classifying words it contains, e.g. if url contains words 'bang' and '18' there is high probability its porn site, I tried implementing it, but it isnt very accurate, are there any python libraries than can help me classify those urls? I'm looking for libraries which can learn from test data, like smart anti-spam filters, like:</p>

<pre><code>    data = {
    'google.com':0,
    'superxxx.com':1,
    'bigbangtheory.com':0,
    'hot18bangbang.com':1,
     ...
     ...
}
</code></pre>

<p>and so on, I've pretty big collection of 'bad' urls, so I think I could train some AI classifier. If this is bad idea, could you recommend me any way of filtering out 'bad' urls from 'good' urls?</p>

<p>This is a good use case for logistic regression, but it's not a very good question for Stack Overflow.  If you already have the training data, go find a tool (or implement this yourself because it wouldn't be that difficult) and then ask a question about the troubles you're having getting it to work.  Stack Overflow is not the place to as for recommendations on tools to use.</p>

python machine-learning artificial-intelligence