Answers.Body: <p>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.</p>
  
  <p>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.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-08T13:37:40.717Z
Answers.Text: 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 :)
Answers.UserDisplayName: Christoph
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-08T07:49:22.200Z
Answers.LastActivityDate: 2016-08-08T07:49:22.200Z
Answers.UserDisplayName: Cem Kalyoncu
Answers.Body: <p>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 <a href="http://mammothdata.com/sentiment-analysis-on-enrons-emails-with-apache-spark/" rel="nofollow">this article</a>.  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.</p>
  
  <p>Note that this isn't the most sophisticated technique in the world, but it's been found to be surprisingly effective. </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-08T18:19:35.150Z
Answers.LastActivityDate: 2016-08-08T18:19:35.150Z
Answers.UserDisplayName: mindcrime
Answers.Body: <p>I would completely agree with mindcrime and Cem Kalyoncu.</p>
  
  <p>Take into account that passive agressiveness for example is more difficult to detect (irony, black humour, sarcasm likewise)</p>
  
  <p>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)</p>
  
  <p>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.</p>
  
  <p>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"</p>
  
  <p>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.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-09-30T15:49:46.340Z
Answers.LastActivityDate: 2018-09-30T15:59:31.110Z
Answers.LastEditDate: 2018-09-30T15:59:31.110Z
Answers.UserDisplayName: Canelo Digital
Answers.Body: <p>The answer by <a href="https://ai.stackexchange.com/users/210/cem-kalyoncu">Cem Kalyoncu</a> mentions the difficulty of building a ground truth database for aggressiveness.</p>
  
  <p>One alternative approach would be to attempt to operate at the <em>concept level</em>, which would allow the use of pre-existing ontologies such as ConceptNet.</p>
  
  <p><a href="http://www.cs.stir.ac.uk/~spo/publication/resources/sentiment-analysis.pdf" rel="nofollow noreferrer">Here's a paper</a> that describes this technique.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-08T13:50:27.313Z
Answers.Text: 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!
Answers.UserDisplayName: Christoph
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-08T08:26:24.703Z
Answers.LastActivityDate: 2016-08-08T13:51:13.120Z
Answers.LastEditDate: 2017-04-13T12:53:10.013Z
Answers.UserDisplayName: NietzscheanAI
Body: <p>Just for the purpose of learning I'd like to classify the likeliness of a tweet being in aggressive language or not. </p>
  
  <p>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?</p>
  
  <p>It feels a bit like the chicken and egg problem to me so I wonder how would I approach the problem?</p>
  
Tags: <classification><datasets>
Title: How to classify language as friendly or aggressive with AI?
UserDisplayName: Christoph
ThreadText: # How to classify language as friendly or aggressive with AI?
  
  (Asked by: username_0 on 2016-08-08)
  
  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?
  
  **Tags:** classification, datasets
  
  ---
  
  ## 4 answers
  
  ### Answer by username_4 on 2016-08-08. Score: 2 | Accepted answer
  
  The answer by [Cem Kalyoncu](https://ai.stackexchange.com/users/210/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](http://www.cs.stir.ac.uk/~spo/publication/resources/sentiment-analysis.pdf) that describes this technique.
  
  > **Comments:**
  > **username_0**: 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!  
  
  ---
  
  ### Answer by username_1 on 2016-08-08. Score: 3
  
  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.
  
  > **Comments:**
  > **username_0**: 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 :)  
  
  ---
  
  ### Answer by username_2 on 2016-08-08. Score: 2
  
  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](http://mammothdata.com/sentiment-analysis-on-enrons-emails-with-apache-spark/). 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.
  
  
  ---
  
  ### Answer by username_3 on 2018-09-30. Score: 1
  
  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.
  
  
  ---
  
  