# A Hybrid System for Subjectivity Analysis

Authors: Samir Rustamov
Journal: Advances in Fuzzy Systems
 (2018)

---

## Abstract

We suggested different structured hybrid systems for the sentence-level subjectivity analysis based on three supervised machine learning algorithms, namely, Hidden Markov Model, Fuzzy Control System, and Adaptive Neuro-Fuzzy Inference System. The suggested feature extraction algorithm in our experiment computes a feature vector using statistical textual terms frequencies in a training dataset not having the use of any lexical knowledge except tokenization. Taking into consideration this fact, the above-mentioned methods may be employed in other languages as these methods do not utilize the morphological, syntactical, and lexical analysis in the classification problems.


---

## Body

## 1. Introduction

Identification of subjective data from web documents having opinions within are gaining incrementing interest. Opinions are often views formed by individuals about their sentiments, appraisals, or feelings, etc., not necessarily based on fact or knowledge. Identification of subjectivity attempts to recognize if this written piece of work conveys opinions (personal) or a body of objective facts [1]. This analysis has been utilized in many natural language and text mining solutions. With the aim of generating more instructive data, subjectivity detection has been employed as a primary sifting stage in a lot of natural language processing assignments.Through our experimentation we are aiming to work out techniques in order to establish classifiers able to identify subjective expressions from objective ones. By means of language independent feature weighting, in the experiment the sentence-level subjectivity classification is attained. A subjectivity database from the opinions about films of “Rotten Tomatoes” [2] was deployed as an experiment.In the paper, we suggested different structures of hybrid systems based on various supervised machine learning algorithms such as Hidden Markov Model (HMM), Adaptive Neuro-Fuzzy Inference System (ANFIS), and Fuzzy Control System (FCS) which achieved sufficient results. These machine learning methods have been employed for subjectivity analysis individually [3, 4] and our aim is to improve performance of classification by using hybrid systems, which is successfully applied by us in sentiment analysis and natural language call routing problem [5, 6]. Our feature extraction algorithm computes a feature vector using the statistical textual terms frequencies in the corpus not having the use of any lexical knowledge except tokenization. Taking into consideration this fact, the above-mentioned methods may be employed in other languages as these methods do not utilize the lexical, grammatical, and syntactical analysis within the classification process.


## 2. Related Work

With the aim of recognizing the subjective data in written piece of work or speech, various nonsimilar supervised and unsupervised learning algorithms have been recently analyzed.A bootstrap technique was employed by Riloff and Wiebe [7] with the aim of studying subjectivity classifiers from a nonannotated texts collection. An identical method was applied by Wiebe and Riloff [8]; however, they studied objective sentences aside from subjective sentences.With the objective to classify subjective and objective sentences, a MinCut based algorithm was deployed by Pang and Lee [9]. Through this experiment they targeted eliminating objective expressions from each analysis and ameliorating the classification accuracy up to 86.4%.A Web mining technique was offered by Grefenstette et al. [10] in order to identify subjective adjectives.Techniques of classifying the strength of opinion within personal sentences were suggested by Wilson et al. [11] and Kim et al. [12].Subsumption relationships were defined by Riloff et al. [13] within n-grams, unigrams, and lexico-syntactic samples. It was discovered that, in case of subsumption of one feature by another, there is no need for subsumed feature. The subsumption pecking order eliminates a feature set; hence the eliminated feature sets may ameliorate classification functionality.The utilization of prosodic feature, wordn-grams, character n-grams, and phoneme n-grams for subjectivity identification and polarity subsumption of conversation acts in multiparty dialog was researched by Raaijmakers et al. [14]. It was figured out that, for subjectivity detection, an association of phoneme-level information, word-level, prosodic, and character-level provides better performance. The best performance is acquired with an association of phonemes, words, and characters in polarity classification.By utilizingn-gram word successions with fluctuating level of lexical instantiation, the study of patterns of subjectivity available both in labelled and unlabelled information was suggested by Carenini and Murray [15]. It was demonstrated that study of subjective written words with fluctuating instantiation levels from both commented as well as unprocessed information may ameliorate subjectivity recognition and polarity labelling for speech in the meetings and email messages.Delta TFIDF which is the intuitional general purpose method was suggested by Martineau and Finin [16] to weigh word scores effectively prior to classification. The comparison was made between the results of TFIDFs SVM difference and SVM Term Count Baseline for subjectivity subsumption. The comparison outcomes demonstrated that Delta TFIDF SVM gives low variance with high accuracy.The subjectivity of postings on Twitter was categorized by Barbosa and Feng [17] according to two feature types such as metainformation about the terms on tweets and specifications of how tweets have been written.With the aim of recognizing sentence-level subjectivity, Yulan He [18] suggested SubjLDA through adjusting the unused Dirichlet allocation method by including an additional layer to describe subjectivity meaning.The classification of subjectivity at the segment level was suggested by Benamara et al. [19] for discourse-based sentiment analysis. Each component was classified into four groups such as S, OO, O, and SN wherein S components comprise unambiguously lexicalized subjective as well as appraising phrases, OO components are positive or negative expression embodied in an objective component, O components comprise neither a word with lexicalized subjectivity nor embodied opinion, and SN components are subjective, however nonappraising, which are utilized to express thoughts.Remus [20] showed that using readability formulae and their combinations as features in addition to already well-known subjectivity clues leads to significant accuracy improvements in sentence-level subjectivity classification.Bayesian model with pecking order grounded on Latent Dirichlet Allocation, called subjLDA, for sentence-level subjectivity recognition that reflexively determines if the used expression is sentiment or fact was proposed by Lin et al., [1].Each of these models is based on English information and an English subjectivity dictionary is utilized by most of models. Some models have been recently presented on sentence subjectivity classification in Japanese [21], Chinese [22, 23], Romanian [24, 25], Urdu [26], and Arabic [27] and other models used various machine learning algorithms utilizing universal set of features as well as language specific features.With the aim of automatically generating resources for a new language through utilizing the resources and instruments for English for subjectivity analysis, various models were researched by Mihalcea et al. [25] and Banea et al. [24]. With the objective of establishing most accurate classifiers for subjectivity classification; another method was employed by Banea et al. [28].Some methods which aim to discover features which can be employed in other languages have been recently investigated. For instance, the classification of subjectivity which utilizes features which does not depend on language was suggested by Mogadala and Varma [29] and tests were conducted on 5 various languages.Appel et al. [30] proposed a hybrid approach using SentiWordNet [31] and fuzzy sets to estimate the semantic orientation polarity and intensity of sentiment words, before computing the sentence-level sentiments. Muhammad et al. [32] introduced a lexicon-based sentiment classification system for social media genres, which captures contextual polarity from both local and global context. Fernández-Gavilanes et al. [33] proposed a novel approach to predict sentiment in online texts based on an unsupervised dependency parsing-based text classification method [34].There are many other types of sentiment analysis that have been developed, such as irony detection [35], multilingual support [36], and differentiating negative emotions [37].The application of supervised models using language independent features for classification of objective and subjective expressions is our primary target within the present experiment.


## 3. Feature Extraction

Feature extraction algorithms are an important element of any machine learning model. This algorithm is characterized by us as instinctive and computationally effective which does not demand any supplementary comment by individuals as well as lexical knowledge except tokenization. The mentioned algorithm comprises two parts: preprocessing (information preparation) and computation of the feature vectors.


## 4. Preprocessing

5000 objective and 5000 subjective labelled sentences from movie reviews are utilized for training process [9]. The classification based on machine learning uses two several sets of documents such as a training set and a test set. The training set is utilized by an automatic classifier with the aim of learning the distinguishing features of documents, and the test set is utilized to authenticate the performance classifier. We currently illustrate the information dispatching in the dataset. With the aim of forming the word list, the following proceedings are implemented:(i)
Gather all documents from the training set and create one whole document;(ii)
Transfigure content of the document to term matrix;Taking into consideration that our goal is to avoid lexical knowledge utilization, every term is considered as a single code term. According to our algorithm characteristics, verbs are not sorted in particular tenses (i.e., “contribute” in present tense and “contributed” in past tense) as well as nouns in singular or plural (i.e., “infant” in singular and “infants” in plural). In lieu, words are considered as different terms.We parted the data collection stochastically into 2 parts for testing and training and created 10 folds. 90% of the data in each folder is used for training and 10% for testing, respectively.


## 5. Calculation of Feature Vectors

Frequency statistics analysis is used in majority of language independent feature extraction algorithms. Its periodically weighting functions are utilized. In the present research, we endeavored to scrutinize which features were appropriate for Neuro-Fuzzy models.Let us describe some of the parameters:1.
M is a number of terms in the training set;2.
N is a number of classes;3.
R is a number of sentences in the training set;4.
Or=o1r,o2r,…,oTrr are the sentences in the training dataset, where Tr is the length ofrth sentence, r=1,2,…,R;5.
μi,j describes the association betweenith term and thejth class i=1,…,M;j=1,2,…,N;6.
ci,j is the number of timesith term occurred in thejth class;7.
ti=∑jci,j denotes the occurrence times of theith term in the training set;8.
frequency formula for thei th term in the jth class(1)c-i,j=ci,jti.A new weighting factor having an impact on the system accuracy is applied so that in lieu of the quantity of documents we take the quantity of classes in the prevalent Inverse-Document Frequency (IDF) formula. Like IDF, we distinguish this coefficient as Pruned ICF (Inverse-Class Frequency) [3].(2)ICFi=log2NdNi,where i is a term, dNi is the number of classes containing the term i, in which c-i,j>q, where(3)q=1δ·N.δ=1.4 is found empirically for the current problem.The membership degree of the terms (μi,j) for relevant classes may be evaluated by specialists or can be computed by means of empirical methods. Taking into consideration that we target not to utilize human comments or lexical knowledge, we estimated the membership degree of every word through an analytical method as mentioned below i=1,…,M;j=1,2,…,N:(4)TF:μi,j=c-i,j∑v=1Nc-i,v;(5)TF·ICF:μi,j=c-i,j·ICFj∑v=1Nc-i,v·ICFv.


## 6. Subjectivity Detection Using Fuzzy Control System

Fuzzy inference is the process wherein the mapping is formulated from given data to outcome(s) through utilizing fuzzy logic. By means of a basis provided by this mapping decisions can be made, or samples can be distinguished. Fuzzy inference process draws in logic operations if-then rules and membership functions [38]. In lieu of expert knowledge, in the primary phase with the aim of computing membership function, we apply a statistical method. Afterwards, we employ fuzzy operations and through the backpropagation algorithm we adjust parameters. The general structure of Fuzzy Control System is illustrated in Figure 1.Figure 1
General description of FCS.Our algorithm (r=1,2,…,R) is applied as follows.(1)
(μi,jr) - membership degree of terms of the rth sentence is computed by using (4)-(5).The Center of Gravity Defuzzification (CoGD) technique is employed for defuzzification. This method prevents defuzzification ambiguities, in case output degree of membership is calculated from several crisp output values.Objective and subjective expressions classified in accordance with classes are trained by a FCS.The cost function is expressed as follows [39]:(6)Ey=12∑r=1R∑j=1Nμ--jryj∑j=1Nμ--jr-dr2⟶miny∈RN.y=y1,y2,…,yN,  dr∈1,2,…,N is the desired output.The function’s partial derivatives are computed as follows:(7)∂Ey∂yi=∑r=1Rμ--jr∑j=1Nμ--jr∑j=1Nμ--jryj∑j=1Nμ--jr-dr,t=1,2,…,N.We applied conjugate gradient decent method for minimization of function (6) and used y∗ optimal value in next stage.(8)y--=∑j=1Nμ--jryj∗∑j=1Nμ--j.Rounding value ofy-- gives index of appropriate class, if it satisfies the following condition:(9)s=is∈I,ify--∈is-Δ1,is+Δ1reject,otherwise,where I=1,2,…,N and is is the indicator of the relevant class. In this case, Δ1∈0;0.5 is the primary quantity, which affects to the system reliability.Inspection of feature vector providing the best outcomes for Fuzzy Control System is obvious. Average accuracies of FCS over 10-fold cross validation are illustrated in Table1. It must be emphasized that these outcomes hinge on the classification technique and might be dissimilar for every classifier.Table 1
The results of Fuzzy Control Systems with TF andTF⋅ICF features.
Features TF T F ⋅ I C F Accuracy 89.87 % 91.32 %Delta TFIDF features [16] related to FCS were inspected as well. Due to fact that Delta IDF weighting factors of both classes are identical, the accuracy of the system is not modified in case of employing Delta IDF weighting factor. As it is seen from Table 1, the accuracy of the system increases following the deployment of Pruned ICF weighting coefficient. Recognition results of FCS with different values of Δ1 are given in Table 2.Table 2
The results of Fuzzy Control Systems withTF⋅ICF features.
Δ1 = 0.3 Δ1 = 0.4 Δ1 = 0.5 Correct (%) 76.53 85.17 91.02  Reject (%) 20.81 10.02 0.01  Error (%) 2.66 4.81 7.97The rejection result is 0.01 forΔ1=0.5. It means after applying Pruned ICF weighting 0.01% expressions’ terms become 0 in the testing process.


## 7. Adaptive Neuro-Fuzzy Inference System For Subjectivity Detection

General structure of Adaptive Neuro-Fuzzy Inference System is demonstrated in Figure2 [40]. Regarding the linguistic notes, the fuzzy interface block gives an input vector to a Multilayer Artificial Neural Network (MANN).Figure 2
The general structure of Adaptive Neuro-Fuzzy Inference System.We utilized statistical evaluation of membership degree of words by (5) in lieu of linguistic statements in the primary phase. Afterwards, we employed (3) and (4) fuzzy operations.MANN is applied to the output of the fuzzification operation. The structure of MANN in ANFIS is illustrated in Figure3.Figure 3
The structure of MANN in ANFIS.The main parameters of MANN are described as follows.1.
L is the number of MANNs layers;2.
Nl is the number of neurons on layer l, l=1⋯L;3.
Ilj- is set of neurons of layer (l-1), which connected to the neuron j on layer l;4.
θjl is bias of neuron j on layer l;5.
wijl is weighted coefficient (synapse) of connection between neuron i on layer (l-1) and neuron j on layer l;6.
xj,ris the input vector; the output of fuzzification is given to the MANN as input, xj,r=μ--jr;7.
sj,rl and yj,rl are state and output value of neuron j on layer l for input signal xr∈X of the neural networks.(10)sj,rl=∑i∈Ilj-wijl·yi,rl-1+θjl,(11)yj,rl=fsj,rl,j=1,…,Nl,l=1,…,L,(12)yj,r0=xj,r,j=1,…,N0,where f· is a given nonlinear activation function for which we use the hyperbolic tangent(13)ftanz=ez-e-zez+e-z.Let the training setxr,d-r, r=1,…,R pairs be given, where d-r=(d-1,r,…,d-NL,r) is desired output for xr input signal. The training of MANN consists in finding such wijl and θjli∈Ilj-,j=1,…,Nl,l=1,…,L, herewith on xr input signal that MANN has output yr, which is optimally close to the desired output d-r. MANN’s outputs are taken as indexes of classes appropriate to the sentences. Usually, training quality is defined by the mean square error function [41]:(14)Ew,θ;x,s,y=1R∑r=1RηrErw,θ;xr,sr,yr,Erw,θ;xr,sr,yr=12∑j=1NLyj,rL-d-j,r2, where ηr is coefficient, which determines the belonging “quality” of input xr to its “ideal” pattern r=1,…,R,j=1,…,NL.The task of MANN training stipulates to minimize the criterion (14) according to parameters (w,θ) with (10)-(12) requirements. The MANN in the developed system was trained using the conjugate gradient method.We set two thresholds for the acceptance recognition:1.
y-k≥Δ2,2.
y-k-y~p≥Δ3.y is the output of Multilayer Artificial Neural Network, y-kand y~p are maximum two elements of the vector y. It can be described as follows:(15)y-k=max1≤i≤Nyi,k=argmax1≤i≤Nyi,y~p=max1≤i≤k-1;k+1≤i≤Nyi.Subjectivity detection results of ANFIS with variousΔ2 and Δ3 are given in Table 3.Table 3
Cross validation results of ANFIS withTF⋅ICF feature.
No restriction Δ 2 = 0.5; Δ3=0.5 Δ 2 = 0.8; Δ3=0.5 Correct (%) 92.16 85.85 78.81  Reject (%) 0.01 8.58 18.72  Error (%) 7.83 5.57 2.47The accuracy of FCS (92.02%) is less than the accuracy of ANFIS (92.16%) due to extra variables in the hidden layers of the MANN.


## 8. Subjectivity Detection Using Hidden Markov Model

HMMs are a substantial statistical method for modeling generative sequences that can be categorized by a fundamental process generating a perceptible sequence. HMMs have been successfully applied in speech recognition. They have also been used successfully in some NLP problems such as part-of-speech tagging, expression yielding, and excerpting necessary data from documents [42].With the aim of classifying objective and subjective expressions, a discrete ergodic HMM was employed. We parted expressions into a lot of states and yielded terms comprising these states. Gathering such states provides us with better outcomes and does not use knowledge of language.Let us describe main parameters of HMM as follows [4]:1.
π=πii=1N is the initial state distributions: πi=Pq1=i, whereN is the number of states.2.
A=ai,j is the state transition probability matrix, ai,j=Pqt+1=j∣qt=i, 1≤i,j≤N.3.
B=bjotj=1N are the state-dependent observation probabilities. Here, for every statej, bjot=Pot∣qt=j is the probability distribution of words occurring in states.4.
Or=o1r,o2r,…,oTrr are the observation sequences, whereRis the number of observed sequences, Tr is the length ofr-th observed sequence, and Tr≤T, T is the given quantity, r=1,2,…,R.We applied Baum-Welch algorithm for the training of HMMs for all classes. The scaled-forward algorithm is applied for the estimating probability of classes for each observed sentence in testing process. The maximum probability among probabilities of classes is found as a decision (Figure4).Figure 4
Subjectivity detection using HMM.The HMM outcomes with various states are illustrated in Table4. Experiments were carried out for the ergodic and left-right Hidden Markov Models. According to experiments ergodic HMMs with 2 states show best performance.Table 4
The results of ergodic and left-right HMMs for detecting sentence level subjectivity.
1 state 2 states 3 states 5 states Left-right HMM (%) 89,37 88,26 87,28 86,85  Ergodic HMM (%) 89,38 89,63 89,33 89,21


## 9. Hybrid Systems

With the aim of classifying the subjectivity and objectivity of sentences, we suggest employing a combined system utilizing the HMM, FCS, and ANFIS methods. Within the experiment process we analyze each sentence by all methods. The outcomes of HMMs, FCS, and ANFIS are directed to the decision-making block and compared therein.Two types of hybrid systems are suggested.


### 9.1. Hybrid-I

The outcomes verified by the HMMs, FCS, and ANFIS methods are confirmed by this system. In case of decline of some of these models’ classification, no decision is accepted by the system. As the system forestalls the error in the testing process, it is considered more reliable. The results of Hybrid-I are shown in Table5.Table 5
The results of Hybrid-I.
FCS(%) ANFIS (%) EHMM-2 (%) Hybrid –I Correct ( % ) Rejection ( % ) Error ( % ) Average 92.02 92.16 89.63 88.21 6.67 5.12


### 9.2. Hybrid-II

We suggest a sequential method in this system. In accordance with the procedure, in case of failure by one classifier to classify a sentence, the unclassified sentence will be passed to the next classifier up to classification of the given sentence or no availability of another classifier. By means of this method, the number of rejected sentences is reduced.At first ANFIS is applied to rejected sentences by FCS and then consequently ergodic HMMs with 2 states are applied to the rejected sentences by ANFIS in Hybrid-II. By this way we increase classification rate up to 92.24%. The results of Hybrid-II are given in Table6.Table 6
Average 10-fold CV results of Hybrid-II.
FCS(Δ1=0.3) ANFİS (Δ2=0.8;Δ3=0.5)Applied rejected samples of FCS EHMM-2 (%) Hybrid-II Correct (%) Correct (%) Rejection (%) Error (%) Correct (%) Rejection (%) Error (%) 76.53 20.81 2.66 78.52 18.76 2.72 73.13 92.24


## 9.1. Hybrid-I

The outcomes verified by the HMMs, FCS, and ANFIS methods are confirmed by this system. In case of decline of some of these models’ classification, no decision is accepted by the system. As the system forestalls the error in the testing process, it is considered more reliable. The results of Hybrid-I are shown in Table5.Table 5
The results of Hybrid-I.
FCS(%) ANFIS (%) EHMM-2 (%) Hybrid –I Correct ( % ) Rejection ( % ) Error ( % ) Average 92.02 92.16 89.63 88.21 6.67 5.12


## 9.2. Hybrid-II

We suggest a sequential method in this system. In accordance with the procedure, in case of failure by one classifier to classify a sentence, the unclassified sentence will be passed to the next classifier up to classification of the given sentence or no availability of another classifier. By means of this method, the number of rejected sentences is reduced.At first ANFIS is applied to rejected sentences by FCS and then consequently ergodic HMMs with 2 states are applied to the rejected sentences by ANFIS in Hybrid-II. By this way we increase classification rate up to 92.24%. The results of Hybrid-II are given in Table6.Table 6
Average 10-fold CV results of Hybrid-II.
FCS(Δ1=0.3) ANFİS (Δ2=0.8;Δ3=0.5)Applied rejected samples of FCS EHMM-2 (%) Hybrid-II Correct (%) Correct (%) Rejection (%) Error (%) Correct (%) Rejection (%) Error (%) 76.53 20.81 2.66 78.52 18.76 2.72 73.13 92.24


## 10. Conclusion

Three various classification system methods such as FCS, ANFIS, and HMM were depicted and employed by us for detecting the sentence-level subjectivity in a film analysis database. Training and testing mechanisms of these methods have been particularly demonstrated by us to classify sentences as objective and subjective. Through this analysis we targeted developing methods which would be capable of being applied in various languages since they do not depend on linguistic knowledge. The feature extraction proceeding is a significant element of these methods. We concentrated on study of informative features enhancing the precision of the systems which do not have language specific restrictions. Thus “Pruned ICF Weighting Function” novel was conceived with a parameter specially calculated for the subjectivity data set. While bringing the already created system in comparison with other different systems, we should foreground that, in fact, the utilization of linguistic knowledge increases precision. Due to fact that linguistic knowledge is not used in our method, our output may solely be compared with methods having same restrictions which utilize components based on bag of terms that are investigated on the same data collection. Researches of Pang and Lee [9] and Martineau and Finin [16] are included in those examples. By means of Naıve Bayes classifiers Pang and Lee achieve 92% accuracy on sentence-level subjectivity classification and through utilization of SVMs they report 90% on the same set of data. 91.26% accuracy was achieved by Martineau and Finin [16] utilizing SVM Difference of TFIDFs. The presently achieved outputs are similar as follows: FCS (92.02%), ANFIS (92.16%), and HMM (89.63%). Notwithstanding these indications, the methods we suggested have certain superiorities. Since function (6) is reduced only regarding y=y1,y2,…,yN (in the identified problem N=2), FCS has low complexity compared to other sophisticated supervised machine learning methods. Through extra fluctuations added in the central layer of the neural network, ANFIS may slightly increase accuracy. In case of applying IF-THEN rules in ANFIS and FCS, it is assumed that the accuracy of the system will increase to the level where it gets abreast with human discernment. FCS and ANFIS categorize sentences by dint of occurrence of the words in the output; however the HMM categorizes sentences according to the arrangement of the sentences. The given interpretation can be utilized to establish two various types of hybrid systems. Through combining multiple classifiers, a better performance than the result of any classifier can be achieved. The Hybrid-I system forestalls particular errors in the classification process, and the Hybrid-II system improved the accuracy to 92.24%.



---

*Source: 2371621-2018-06-03.xml*