## 4 LeSSA--Implementation and Technical Details
### Linguistic Rules  
Linguistic rules assist in identifying context-aware domain-specific sentiment words in a better way. Researchers [4] have pointed out that the usage of linguistic rules could positively affect the performance of sentiment classification. Motivated by [47], we present how to identify and extract context-aware domain-specific sentiment words using the following linguistic rules. We split the review documents into sentences and identify all those sentences from the review documents that comprise the below conjunction clauses. We employ the Stanford Parser to parse each sentence and extract context-aware domain-specific sentiment words. Each sentence was parsed into the syntactic tree during tokenization and when applicable all the sentences that comprise conjunctions are extracted for domain-specific sentiment feature extraction. * **Rule 1--similar sentiment**: If two words or clauses are linked by \"and\" conjunction in a similar sentence, then we can infer that they have a similar sentiment orientation. For example, \"This phone is nice and cheap\", both \"nice\" and \"cheap\" express positive sentiment orientation. Based on this, if we are not sure about the sentiment orientation of the word \"cheap\", but we can tell that the sentiment orientation of the word \"nice\" is positive in general sentiment lexicon, then we can deduce that \"cheap\" is also a positive word. * **Rule 2--opposite sentiment**: It comprises some words like, \"but\", \"while\", \"despite\", \"unless\", \"however\", \"although\", \"nevertheless\". If two words are connected by \"but\" conjunction, then we can assume that they both have opposite sentiment orientations. For example, \"This laptop is nice but expensive\", both \"nice\" and \"expensive\" are sentiment words. Based on this rule, if we are not sure that the word after \"but\" conjunction is positive or negative, but we distinguish that the word before \"but\" conjunction is a sentiment word, then we can refer that the word after \"but\" conjunction is also a sentiment word. * **Rule 3--negation handling**: The negation word or phrase generally alters the sentiment orientation (polarity) of the sentiment word in the sentence or clause. Negations are typical words such as, no, not, neither and do not and also pattern-based negations like \"stop\" vb-ing and \"quit vb-ing\". We used a list of negation words to determine negation expression in the review text. We adopted a simple method for negation handling. If a negation word, e.g., \"not\" appears at the left side of sentiment word then, in this case, the sentiment orientation of the sentiment word will be changed. For example, \"This movie is not good\", the word negation \"not\" alters the sentiment polarity of word \"good\". Negation handling is applied at tokenization time. There are also negation words in phrases such as, \"not only\", \"not just\", \"not all\" which do not mean negation we do not consider them as a negation expression pattern. The word coverage limit in the sentiment lexicons is the main challenge. If a sentiment word is not included in the existing sentiment lexicons, then it is ignored, which can affect the sentiment score of the review text. In order to address this problem, we employ semantic knowledge using WordNet to find the synonyms of the word and obtain its sentiment orientation. During document sentiment score, each review text is tokenized, and POS tag is assigned to extract the likely words such as adjectives, adverbs, verbs and nouns. The sentiment score of each word is searched in the integrated wide coverage sentiment lexicon and using semantic knowledge. For each word in the review text, a sentiment score +1 and -1 is assigned to positive and negative words, respectively. The review with a score above zero is classified as positive, and the review with a score of -1 and below is classified as negative. Linguistic rules for dealing with context-dependent sentiment words are applied, and negated words are handled as mentioned before.