*Article* **A Fuzzy Logic Based Intelligent System for Measuring Customer Loyalty and Decision Making**

#### **Usman Ghani \*, Imran Sarwar Bajwa and Aimen Ashfaq**

Department of Computer Science & IT, The Islamia University Bahawalpur, Bahawalpur 63100, Pakistan; imran.sarwar@iub.edu.pk (I.S.B.); aimenashfaq62@gmail.com (A.A.)

**\*** Correspondence: usmanrazi@hotmail.com

Received: 10 November 2018; Accepted: 12 December 2018; Published: 17 December 2018

**Abstract:** In this paper, an intelligent approach is presented to measure customers' loyalty to a specific product and assist new customers regarding a product's key features. Our approach uses an aggregated sentiment score of a set of reviews in a dataset and then uses a fuzzy logic model to measure customer's loyalty to a product. Our approach uses a novel idea of measuring customer's loyalty to a product and can assist a new customer to take a decision about a particular product considering its various features and reviews of previous customers. In this study, we use a large sized data set of online reviews of customers from Amazon.com to test the performance of the customer's reviews. The proposed approach pre-processes the input text via tokenization, Lemmatization and removal of stop words and then applies fuzzy logic approach to take decisions. To find similarity and relevance to a topic, various libraries and API are used in this work such as SentiWordNet, Stanford Core NLP, etc. The approach utilized focuses on identifying polarity of the reviews that may be positive, negative and neutral. To find customer's loyalty and help in decision making, the fuzzy logic approach is applied using a set of membership functions and rule-based system of fuzzy sets that classify data in various types of loyalty. The implementation of the approach provides high accuracy of 94% of correct loyalty to the e-commerce products that outperforms the previous approaches.

**Keywords:** fuzzy logic; decision making; customer loyalty; customer reviews
