Classification of Messages in Online Social Network using Short Text Classifier

At present Online Social Networks (OSN) usually not provide much support to the user for message filtering. To rectify this issue, a work is proposed which allows OSN users to have a direct control on the messages posted on their walls. Here the users can control the messages posted on their own private space to avoid unwanted messages displayed and they can also block their friend from friends list. A new Global Vector Space Model (GVSM) is used here in text representation and pattern search based classifier is introduced for these OSNs which automatically labels messages in support of content-based filtering. The evaluation result shows the best performance of this study for message filtering in OSN, to customize the user walls and their profiles. Efficiency of this study is proved by the results of accuracy and elapsed time interval.


INTRODUCTION
Online Social Network is most interesting and popular interactive medium to communicate, share and distribute information (Social Media, 2010).Information's like several types of content, including free text, image, audio and video information daily and along with Facebook information average user creates 90 pieces of substance every month, while more than 30 billion quantity of substance are distributed every month (Wikipedia).This creates the need for secure network and there is lot of chance to hack the information.The vast and dynamic character of this information produces the premise for the employment of web content mining strategies aimed to automatically discover useful information dormant contained by the information.They are instrumental to give a dynamic support in complex and sophisticated works involved in OSN administration, for example such as information filtering or access power (Vanetti et al., 2013;Sujapriya et al., 2014).
Moreover, many proposals are discussed earlier which is mainly to provide users a classification mechanism to avoid they are overwhelmed by failed information.In OSNs, information filtering can also be utilized for a dissimilar, more responsive, purpose.This is because that in OSNs there is the possibility of posting or viewing other posts on public/private regions, called in common walls.Information filtering is used in common wall to customize their wall and to provide users the capability to automatically control the messages written on their individual walls, by filtering out unwanted communication.This is not normally present in OSN network.Now, at present OSNs provide very tiny maintenance to prevent unwanted messages on user walls.For an example, in a social network Face book permits users to edit who is allowed to insert messages in their walls (i.e., friends, mutual friends, defined groups of friends or friends of friends).But content-based preferences are maintained and there is no possibility to prevent undesired messages, like politicians or some other who can easily post on users wall.There is no filter for about the content (Vanetti et al., 2013).
The use of semantic information into text retrieval or text classification has been controversial.For example in Mavroeidis et al. (2005) it was shown that a GVSM using WordNet (Fellbaum, 1998) senses and their hypernyms improves text classification performance, especially for small training sets.In contrast, Sanderson (1994) reported that even 90% accurate Word Sense Disambiguation (WSD) cannot guarantee retrieval improvement, though their experimental methodology was based only on randomly generated pseudo words of varying sizes.Similarly, Voorhees (1993) reported a drop in retrieval performance when the retrieval model was based on WSD information.On the contrary, the construction of a sense-based retrieval model by Stokoe et al. (2003) improved performance, while several years before, (Krovetz and Croft, 1992) had already pointed out that resolving word senses can improve searches requiring high levels of recall.Carullo et al. (2009), proposed a clustering technique of document is helpful in many field.For clustering of information's here two categories of clustering general purpose and text tilting are used.Novel heuristic online document clustering is predictable here, which is proficient in clustering of text tilting parallel measures.Presentation measure is done in F-measure and then it will be counterpart up with other methods.The result will indicate the power of proposed system.Colbeck (2006) introduced a Social network where two level approaches are stated to combine gloss, trust and origin.An algorithm is developed for concluding trust relationship with origin information and trust gloss in web social network here.Film trust application is introduced in this which uses trust to movie ranking and ordering the review.Film trusts are considered to give the good crop.Bobicev and Sokolova (2008) classification of text is for complex and specific terminology.To shrink the text for confining the text characteristic Fractional Matching method is applied.It develops a language model and the output of this compression provides consistent care of text classification.Prashant et al. (2013) uses a RBFN which is an artificial neural network that uses activation function of radial basis function.The output of the network is a linear combination of radial basis functions of the inputs and neuron parameters.RBF networks have many uses, including function approximation, time series prediction, classification and system control.It is a nonlinear classification function where the model may produce confidence values and it may be robust to outliers; drawbacks of RBFN are the potential sensitivity to input parameters and potential overtraining sensitivity.Schapire and Singer (2000), describe in detail an implementation, called BoosTexter, of the new boosting algorithms for text categorization tasks.And also they compare its performance with a number of other textcategorization algorithms on a variety of tasks.

METHODOLOGY
The proposed system is constructed as follows: Initially the message is given to Content-Based Messages Filtering (CBMF) and the Short Text Classifier (STC) modules.Then obtained components are given to classify messages according to a set of categories.In contrast, the first component exploits the message categorization provided by the STC module to enforce the Filtering Rules (FR) s specified by the user.To enhance the filtering process Black Lists is used along with this.The path followed by a message, from its creating to the possible final posting can be summarized as follows:  When a user enters the private wall of one of his/her contacts, the user tries to post a message, which is intercepted by Filtered Walls (FW). The proposed classifier extracts metadata from the content of the message. FW uses metadata obtained by the classifier, together with data extracted from the social graph and user's profiles, to enforce the filtering and Black List rules. Then the result obtained from the classifier desires whether created message should be posted on the wall or not.

Short text classifier:
Short text classification is to classify the short texts and assign the short text a label from predefined taxonomy which is shorten in text.
The techniques used here for text classification work well on data sets with large documents such as newswires corpora (Lewis et al., 2004;Lewis, 1992), but endure when the documents in the corpus are short.In this context, critical aspects are the definition of a set of characterizing and discriminate features allowing the representation of underlying concepts and the collection of a complete and consistent set of supervised examples.

Text representation:
From the text an appropriate set of features must be extracted by representing the text of a document is an important and difficult step which affects the overall classification.Different sets of features for text categorization have been proposed in the literature (Sebastiani, 2002); but there is a need of extracting most appropriate feature set and feature representation for short text messages have not yet been sufficiently investigated.
Text representation using endogenous knowledge has a good general applicability; however, in operational settings, it is legitimate to use also exogenous knowledge, i.e., any source of information outside the message body but directly or indirectly related to the message itself.
Choosing an additional set of features is done by Domain specific criteria Dp, concerning orthography, known words and statistical properties of messages.Dp features are heuristically assessed; their definition stems from intuitive considerations, domain specific criteria and in some time required trial-and-error procedures.In more detail, correct words.It states the amount of terms t ∈ Τ ∩ Κ , where t is a term of the considered document d and Κ is a set of known words for the domain language.This value is normalized by Bad words: They are computed similarly to the correct words feature, where the set K is a collection of "dirty words" for the domain language.
Likewise sex, vulgar, happy, sad, undefined, angry and offensive can also be calculated.
Regarding features based on the exogenous knowledge, Contextual Features (CF), instead of being calculated on the body of the message, they are conceived as the GVSM representation of the text that characterizes the environment where messages are posted.
In this study GVSM is expanded from Vector Space Model (VSM).Mavroeidis et al. (2005) introduced a GVSM kernel based on the use of noun senses and their hypernyms from WordNet.They showed practically that this can improve text categorization.Stokoe et al. (2003) reported an improvement in retrieval performance using a fully sense-based system.Our approach differs from these techniques that it expands the VSM model using the semantic information of a word thesaurus to interpret the orthogonality of terms and to measure semantic relatedness, instead of directly replacing terms with senses, or adding senses to the model.

The GVSM model:
In GVSM model the documentquery has similarity, the orthogonality between terms and is expressed by the inner product of the respective term vectors .Recall that and are really unknown.The estimation of their inner products is done as the below equation, where and are the senses of terms and respectively.

Maximizing Semantic Compactness (SCM):
Semantic Path Elaboration (SPE): In this model, we assume that each term can be semantically related with any other term and SR t , t , O SR t , t , s , s , O , the new space is of (n.(n-1))/2 dimensions.In this space, each dimension stands for a distinct pair of terms.For a given document vector d in the VSM Term Frequency-Inverse Document Frequency (TF-IDF) space the value is defined for (i, j) dimension of new document vector space as d t , t TF IDF t , d TF IDF t , d .t t .Then the TF-IDF values are added because if any product-based value results to zero, unless both terms are present in the document.The dimensions q t , t of the query are computed similarly.
A GVSM model aims at being able to retrieve documents that not necessarily contain exact matches of the query terms and this is its great advantage.This new space leads to a new GVSM model, which is a natural extension of the standard VSM.The cosine similarity between a document d and a query q now becomes as in below equation: where, n is the dimension of the VSM TF-IDF space.
Classification: Here, the classification is done for OSN using proposed pattern search classification technique.
Pattern search classification: Pattern Search was coined by Hooke and Jeeves ( 1961) is a type of numerical optimization methods where any gradient is not required for optimization.They are characterized by a series of exploratory moves that consider the behavior of the objective function at a pattern of points, all of which lie on a rational lattice.
It is a derivative-free method that performs for every iteration k, a series of exploratory moves around a current approximation, z , in order to find a new approximation z z ∆ s with a lower fitness value for the iteration counter the variable k is used of this inner iterative process.For k 0, the initial approximation to begin the search is z y , applied to each point in the set Y .
The step length scalar is represented as ∆ and the vector s determines the direction of the step.There is an exploratory move to produce ∆ s and the updating of ∆ and s define a particular pattern search method and their choices are crucial to the success of the algorithm.When Φ z Φj z is attained then the iteration is considered successful; otherwise it is unsuccessful.When iteration got successful, the step length is not changed, while in an unsuccessful iteration ∆ is reduced.See for example (Frakes and Baeza-Yates, 1992).
Based on Hooke and Jeeves (1961) search method the algorithm, ∆ skis is computed.This algorithm differs from the usual coordinate search since it performs two types of moves: the exploratory move and the pattern move.An exploratory move is a coordinate search (a search along the coordinate axes) around a selected approximation, using a step length of ∆ .A pattern move is a promising direction that is defined by zz -1 when the preceding iteration was successful and z was accepted as the new approximation.
Then the new trial approximation is defined as z + (zz -1) and an exploratory move is then carried out around this trial point.If this search is successful, the new approximation is accepted as z +1.This HJ iterative procedure terminates, providing a new set of approximations X to the problem, x ← z 1, when the stopping condition ∆ εj is satisfied.Moreover, if this condition cannot be satisfied in k max iterations, then the procedure is stopped with the last available approximation.
Filtering rules: Filtering rules are created for the users' customization.Users have full authority to decide what contents should be blocked or posted on his/her wall by using only Filtering rules.For specify a Filtering rules user profile as well as user social relationship will be considered:

FR
Author, creatorSpec, contentSpec, action where, author is the user who specifies the rule; creatorSpec is a creator specification, contentSpec is a Boolean expression defined on content constraints of the form (C, ml), where C denotes a class of the first or second level and ml is the minimum membership level threshold required for class C to make the constraint satisfied.Action ∈ {block; notify } is denoted for the action to be performed by the system on the messages matching contentSpec and created by users identified by creatorSpec.
For a same user more than a filtering rule can also be applied for effective filtering.The messages given by the users are posted when they are not filtered by any filtering rules.Then the user creates the classes such as angry, vulgar, sex and happy, sad, undefined and offensive dataset.The messages filtered under these classes are desired by the user where they can block or unblock the messages.
And blocked messages arise from the same user several times then the user is automatically blocked temperately.If the user wants to unblock that user then they can release the block.
Blacklists: Blacklist (BL) mechanism is a technique which is used to avoid messages from undesired creators, independent from their contents.They are directly managed by the system, which should be able to determine who are the users to be inserted in BL and decide when users' retention in the BL is finished.For enhancing the flexibility of the system, such information is given to the system through a set of rules.These rules are not defined by the Simple Network Management Protocol (SNMP); therefore, they are not meant as general high-level directives to be applied to the whole community.Rather, we decide to let the users themselves, i.e., the wall's owners to specify BL rules regulating who has to be banned from their walls and for how long.Therefore, a user might be banned from a wall, by, at the same time, being able to post in other walls.
Moreover, among possible information denoting user's bad behavior focus is made on two main measures.The first is related to the principle that if within a given time interval a user has been inserted into a BL for several times, say greater than a given threshold, user might deserve to stay in the BL for another while, as user behavior is not improved.This principle works for those users that have been already inserted in the considered BL at least one time.In contrast, to catch new bad behaviors, here Relative Frequency (RF) is used which let the system be able to detect those users messages continue to fail the FRs.The two measures can be computed either locally, that is, by considering only the messages and/or the BL of the user specifying the BL rule or globally, that is, by considering all OSN users walls and/or BLs.
ABL rule is therefore formally defined as follows: ABLrule is a tuple: where author is the OSN user who specifies the rule, i.e., the wall owner.
CreatorSpec is a creator specification, specified according to A set of attribute constraints of the form an OP av, where an is a user profile attribute name, av and OP are, respectively, a profile attribute value and a comparison operator, compatible with an's domain.
A set of relationship constraints of the form (m; rt; minDepth; maxTrust), denoting all the OSN users participating with user m in a relationship of type rt, having a depth greater than or equal to minDepth and a trust value less than or equal to maxTrust.
Creator Behavior consists of two components RFBlocked and minBanned:

RFBlocked RF, mode, window
Is defined such that: where, #tMessages is the total number of messages that each OSN user identified by creatorSpec has tried to publish in the author wall (mode = myWall) or in all the OSN walls (mode = SN); whereas #bMessages is the number of messages among those in #tMessages that have been blocked.Window is the time interval of creation of those messages that have to be considered for RF computation: where min is taken as the minimum number of times in the time interval specified in window that OSN users identified by creatorSpec have to be inserted into the BL due to BL rules specified by author wall (mode = myWall) or all OSN users (mode = SN) in order to satisfy the constraint.T is taken as the time period the users identified by creatorSpec and creatorBehavior have to be banned from author wall.

EVALUATION RESULTS
The performance of this OSN user's ability of controlling messages and controlling of friends list is measured here.Initially dataset of words are created for stop words, bad words, English words, classes are stored in dataset.
Here chosen dataset contains 645 stop words, 64024 English words, 645 bad words and 7 classes.
These are stored in the administrator section.When the user log in and typed some messages this technique reads each single words from the message.Whether those words comes under the given stop words, bad words, English words and finally they are checked in which class those words belongs.
There are seven classes here; the user can block any of the class from it.From those classes happy is taken as {Neutral}, second level class, wherelse other classes of Angry, Offensive, Sad, Sexual, Violence and Vulgar are first level class.Usually second level class (neutral) is not blocked.The message under those classes gets displayed in user's page.If the user's friend keep on messages in the blocked class then after a period of time that user will be blocked temperiorly.This can be controlled by the user.
The above Table 1 gives the obtained precision; recall and f-measure values are given in percentage for the seven classes are tabulated.The sexual class gets 62.57% precision, 90.24% recall and 76.45% of fmeasure, likewise, vulgar class gets 73.57% precision, The above Fig. 1 shows the precision, recall and F-Measure graph for the classes used in the message blogs, where precision gives percentage of false positive, recall gives percentage of false negative and F-Measure is overall mean of precision and recall.
The above Fig. 2 shows the report of blogs analyzed for the rajesh and sudha who are friends of user devi.From this, rajesh takes 1 blogs and sudha also tooks 1 blogs.
Performance measurement: To measure the performance of this study, accuracy and execution time is taken and it is compared with existing work of fuzzy neural network classifier.
The above Table 2 gives the accuracy of the classified results obtained from the classifier of machine learning and proposed pattern search algorithm.From the result it clearly reveals the proposed work produces 91% which better accuracy than the existing machine learning technique which is 63%.
The above Fig. 3 shows the accuracy comparison between existing fuzzy based classifications for this OSN with proposed pattern search classifier.From the graph the proposed method produces better accuracy than existing.
The execution time interval is time taken for a single message to classify under different class and to filter the messages.
The execution time interval taken by the fuzzy neural network and proposed pattern search algorithm takes single time interval if the given word matches initially itself.Meanwhile, if not then proposed pattern search takes little time interval more than one.

CONCLUSION
In OSN wall networks the message filtering is a needed process at present.This study automatically filters unwanted messages from OSN user walls on the basis of both message content and the message creator relationships and characteristics.The VSM is generalized here as GVSM which is more suitable for Boolean, algebraic and all the statistical values and model considers correlations among index terms.In classification technique pattern search classifier is used to reduce the total number of character comparisons between the pattern and the text to increase the overall efficiency.Here problems such as message filtering, user filtering, messages classification under a class and also customizing user profile are solved.The experimental results are evaluated and the performance of classification is analyzed.From the above section obtained results and performance metrics such as accuracy and time interval are calculated for the existing and proposed technique which proves its efficiency.In future this study can be improved for customized OSNs and to modify or hybridizing filtering rules to also obtaining the location information of the messaged user.

Table 1 :
Precision, recall and F-measure for the classes