4
$\begingroup$

Just for the purpose of learning I'd like to classify the likeliness of a tweet being in aggressive language or not.

I was wondering how to approach the problem. I guess I need first train my neural network on a huge dataset of text what aggressive language is. This brings up the question where I would get this data in the first place?

It feels a bit like the chicken and egg problem to me so I wonder how would I approach the problem?

$\endgroup$

4 Answers 4

2
$\begingroup$

The answer by Cem Kalyoncu mentions the difficulty of building a ground truth database for aggressiveness.

One alternative approach would be to attempt to operate at the concept level, which would allow the use of pre-existing ontologies such as ConceptNet.

Here's a paper that describes this technique.

$\endgroup$
1
  • 1
    $\begingroup$ That's interesting indeed. ConceptNet has a really cool API. I'm not sure if it's worth for me to pursue the idea since I'm really just trying to find ideas to explore to make myself familiar with AI but thank you very much for raising awareness! $\endgroup$
    – Christoph
    Aug 8, 2016 at 13:50
3
$\begingroup$

I did a little search and couldn't find any database that has ground truth for aggressiveness. This means that you need to build yourself a database. This might be huge undertaking. Take thousands of messages, and classify them by hand whether they are aggressive or not. This part is quite labor intensive.

Second part is much easier at start but would be pain to optimize (both performance and computational cost). I would suggest you to start with Naive Bayes classifier for this job. That is the preferred classifier for spam detection. ANN would probably not work for this case because the data would be a huge sparse vector. Estimated number of words in English is over a million, which means the input layer of your ANN should be able to scale up to that number. Search for sparse vector classification for additional classifier that can be used in these cases.

$\endgroup$
1
  • 1
    $\begingroup$ Thank you very much for answer. I wasn't sure if I'm totally off and miss the forest for the trees. I probably just pick a different use case for me to play with then :) $\endgroup$
    – Christoph
    Aug 8, 2016 at 13:37
2
$\begingroup$

A simple way to do it would be lexicograpical sentiment analysis. To do that, you'd need a list of words categorized with a score that reflects "friendly" vs "aggressive" sentiment. For an example of setting up a SA system using Spark, see this article. To do what you're talking about, substitute AFINN for a different dataset. You might have to create said dataset yourself, if there isn't one "out there" like you want.

Note that this isn't the most sophisticated technique in the world, but it's been found to be surprisingly effective.

$\endgroup$
1
$\begingroup$

I would completely agree with mindcrime and Cem Kalyoncu.

Take into account that passive agressiveness for example is more difficult to detect (irony, black humour, sarcasm likewise)

Although another head start could be to think out of the box: Happens by chance that I have lying around a book concerning violent-free communication. So probably your best start could be to talk with linguists about violence in language and start from there. or just make some reviews about how linguists or psychlogists detect violence in language (susprise: It's probably quite complex)

Nevertheless: I don't think you need real AI, a blacklist of words and expressions together with some pattern detection for expressions could be precise enough for the beginning.

Then for all the expressions, words, etc. you could add a bayesian network for the learning part, which works with probablities (like e.g some email spam filters) Search for example for "Naive Bayes spam filtering"

This should be pretty much enough to have a good start, so in strict sense, you don't need real AI here, just BusinessIntelligence and probability calculations.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .