## 3 Our Approach
### Calculation of Violence Risk Score
#### 3.1.3 Semantic Rules  
In this section, the text scoring rules are introduced. Due to the complexity of the Chinese syntax, the sentiment words have various forms of expression. Since emotional words have been extracted and assessed, we can calculate the score of absentences using semantic rules. The sentiment score of a simple sentence can be calculated by the intrasentence rules. As for the overall microblog, which may include several sentences, the relationship between two sentences should also be considered by intersentence rules. According to different expressions of semantic rules, an essential parameter \(z_{n},\ n\in(1,\ 2,\ 3,\ 4)\) is introduced to enhance, weaken, or reverse the sentiment score of a sentence. More specifically, \(z_{1}\) can be used to weaken the sentiment score for a specific expression form by intrasentential rules, and \(z_{2}\), \(z_{3}\), and \(z_{4}\) can be used to reverse, weaken, or enhance the sentiment score by intersentential rules. Intrasentential rules: The inverse words can reverse the polarity of sentiment words, and the degree of adverbs can influence the intensity [28]. Hence, we collect these two kinds of words to make a corresponding dictionary. The reverse dictionary contains 26 commonly used items, such as \"\(\times\)\" (not)\", \"\(\times\)\" (no)\", \"\(\times\)\" (without)\", and so on. The degree adverb dictionary is collected from HowNet, and it is divided into six levels according to different strength. More specifically, the effect of adverbs can enhance or weaken the polarity of sentiment. If adverbs will enhance sentiment polarity, the value of adverbs can be set to be slightly larger than 1. Otherwise, it can be set to be slightly less than 1. This scoring rule is also applicable for other parameters described below, such as \(z_{n},\ n\in(1,\ 2,\ 3,\ 4)\). Table 1 shows some of the degree adverb words and their strength. The following shows four intrasentential semantic rules and the corresponding phrase combination score \(s_{s}\). Let \(n\) be the number of the inverse word, \(p_{s}\) be the strength of the sentiment word, \(p_{p}\) be the polarity of the sentiment words, and \(a_{s}\) be the strength of the degree adverb. (a) Degree adverb + sentiment word:  
\[s_{s}=a_{s}\times p_{s}\times p_{p} \tag{4}\]  
(b) Inverse + sentiment word: The inverse words will change the polarity of a phrase according to the number before it. \[s_{s}=(-1)^{n}\times p_{s}\times p_{p} \tag{5}\]  
where \(n\) refers to the number of inverse words in the sentence. (c) Degree adverb + inverse + sentiment word: This kind of phrase only switches the polarity of the sentences. \[s_{s}=(-1)\times a_{s}\times p_{s}\times p_{p} \tag{6}\]  
(d) Inverse + degree adverb + sentiment word: The inverse word is in the foremost position of the phrase, leading to the weakness of the sentiment strength. We hence set the value \(z_{1}=0.5\). \[s_{s}=(-1)\times s_{s}\times p_{s}\times p_{p}\times z_{1} \tag{7}\]  
Intersentential rules: If a microblog message includes several simple sentences, these sentences are usually not independent, so summing up the values directly without considering the correlation between them will lead to misclassification [29]. As conjunction words connect two simple sentences, we create a model for different types of conjunctions as follows:  
1. Transition relationship. The polarity of the later sentence will reverse, and the whole sentence polarity is consistent with the latter. \[\text{Sen}=z_{2}\times Sen_{1}+Sen_{2},\ \ \ z_{2}=-1\] (8)