Yin-Fu Huang and Heng Lin. Department of Computer Science and Information Engineering. National Yunlin University of Science and Technology. Yunlin ...
Web Product Ranking Using Opinion Mining Yin-Fu Huang and Heng Lin Department of Computer Science and Information Engineering National Yunlin University of Science and Technology Yunlin, Taiwan {huangyf, g9817717}@yuntech.edu.tw
Abstract—Online shopping is becoming increasingly important as more and more manufacturers sell products on the Internet, and many users are using the Internet to express and share their opinions. However, it is impossible for consumers to read all product reviews. Therefore, it is necessary to design effective systems to summarize the pros and cons of product characteristics, so that consumers can quickly find their favorable products. In this paper, we present a product ranking system using opinion mining techniques. Users can specify product features to get back the ranking results of all matched products. In this system, we consider three issues while calculating product scores: 1) product reviews, 2) product popularity, and 3) product release month. Finally, the experimental results show that the system is practical and the ranking results are interesting.
1) product reviews, 2) product popularity, and 3) product release month. Eventually, our system would provide users to specify product features in a query, and send back the ranking results of all matched products. The remainder of the paper is organized as follows. In Section II, we review basic concepts used in this paper. Then, the framework of a product ranking system is proposed in Section III. The system implementation and some product ranking results are described in Section IV. Finally, we make conclusions in Section V. II.
BASIC CONCEPTS
XML
There are various techniques and approaches closely related to our work. We would briefly review the basic concepts of these techniques and approaches.
With the rapid growth of the Web and the convenience of the Internet, more and more people have been changing their shopping habits from traditional to online shopping. For online shopping, since thousands of products are posted on shopping websites, it is impossible for consumers to read all product reviews. Therefore, it is necessary to design effective systems to summarize the pros and cons of product characteristics, so that consumers can quickly find their favorable products.
A. XML Documents An XML document can be represented as a tree structure. A document tree could contain element nodes, attribute nodes, and text nodes which are all mapped from elements, attributes, and texts specified in an XML document. For the XML document as shown in Fig. 1, it has five elements (i.e., book, title, prod, chapter, and para), two attributes (i.e., id and media), and their texts. And, these elements, attributes, and texts are denoted by circles, triangles, and rectangles in the tree representation as shown in Fig. 2, respectively.
Keywords—opinion document; POS
mining;
I.
information
retrieval;
INTRODUCTION
Till now, most product ranking systems are based on product sales, and the ranking results are for the public, not for individual consumers. Beside, although Tian and Liu proposed data mining techniques for product ranking [1], the sentence polarity in product reviews is used as the only one influenced factor. In this paper, a product ranking system using opinion mining techniques to find favorable products for users is presented. Opinion mining was a hot research topic in recent years. Some papers have explored opinion mining methods to identify the polarity [2-4] or to improve accuracy [5, 6]. Opinion mining is very suitable for the applications “many users to discuss a single topic” when a large number of sentences and reviews are on the criticism of a single topic or when exactly identifying the correct rate of a bias direction is required to improve accuracy. Here, our product ranking system considers three issues while calculating product scores:
c 978-1-4673-5895-8/13/$31.00 2013 IEEE
Figure 1. XML document.
184
Several POS tagging systems have been proposed to annotate words automatically with the POS tags. Some POS taggers have been implemented using the rule-based methods [8, 9], while others used the probabilistic methods [10-14]. Besides, neural network models have also been tested in the POS tagging [15, 16].
Figure 2. Tree representation of the XML document.
B. XML Path Language The XML Path Language [7] (i.e., XPath) was defined by the W3C (World Wide Web Consortium), and it is a major element in XSLT (Extensible Stylesheet Language Transformations). XPath uses path expressions to select nodes or node-sets in an XML document. A path expression is the path from an XML node (or the current context node) to another node, or a group of nodes written as a sequence of steps. The character "/" in a path expression is used to separate each step, and three constituent elements can be employed to reach a target node; i.e., 1) directly approaching the target node, 2) specifying the element node for screening, and 3) filtering the node with the attribute having a specified value. Given an example as follows, we can use the path expression “// name[@kind='Laptop']” to find the node "name" with the attribute "kind" and the value "Laptop", and then call function text() to get the text “MacBook Air”.
C. Part of Speech Tagging The Part-of-speech tagging (i.e., POS tagging or POST), also called grammatical tagging or word-category disambiguation, is the process for assigning the correct part of speeches (e.g. noun, adjective, verb, adverb, etc.) to each word in a text based on both its definition and context as follows.
The POS tagging plays a basic role in various Natural Language Processing (NLP) applications. Most of text analysis systems require the POS tagging, such as information extraction, information retrieval, word sense disambiguation, machine translation, and higher-level syntactic processing, etc. In the information extraction, patterns (manually defined linguistic patterns) used for extracting information from texts have references to the POS tags. For example, we might extract phrases which match the pattern "adverb + adjective" from texts.
D. Semantic Orientation There are several methods commonly used to identify opinion words. The most well-known one is the unsupervised semantic orientation method proposed by Turney [17, 18]. They used the Point-wise Mutual Information (PMI) to compute the association of two terms, and then calculated the phrase polarity as follows. SO(word) = PMI(word, “excellent”) – PMI(word, "poor") Besides, the semantic orientation method proposed by Hu [19] is to identify the polarity by WordNet [20]. First, positive and negative opinion words are defined to construct a “seed list”, and then, by the seed list, synonyms and antonyms are found using WordNet. III.
SYSTEM FRAMEWORK
In this section, we propose the framework of a product ranking system as shown in Fig. 3, which consists of the following 7 components: Downloading Product HTML Pages, Extracting Product Reviews and Information, Splitting Product Review Texts into Sentences, Identifying Sentence Polarity, Building Product XML Files, Product Ranking, User Interface. In general, even for the same type of products (e.g. digital cameras), users have their own different needs. Therefore, our system is designed to provide relevant product ranking according to different user needs. First, through the Internet, the system downloads data from Amazon product review pages. Then, it would extract the required product reviews and information from downloaded data, and split them into sentences. Next, it identifies the polarity of the opinion words in each sentence. Finally, the product information and sentence polarity would be integrated into an XML file. Afterwards, users can specify product features in a query, and get back product ranking results.
Figure 3. System framework.
A. Downloading Product HTML Pages For the Amazon product home page, users can specify product categories and brands to download the specified product information. For the example as shown in Fig. 4(a), we
2013 IEEE Symposium on Computational Intelligence and Data Mining (CIDM)
185
focus on a digital camera with the brand initials 'N'. Then, we can download all product HTML pages and information of “Nikon” digital cameras, as shown in Fig. 4(b) and Fig. 4(c).
OrientationPrediction (OP) proposed by Hu [19] to determine the polarity). Here, OP is used to collect the positive set and negative set. First, we define 30 common adjectives in a seed list, of which 15 adjectives are positive and another 15 adjectives are negative. Then, the synonyms and antonyms of the words in the seed list are found using WordNet [20]; this step iterates until no new synonyms or antonyms are found. Finally, the closed set containing the words with positive and negative polarity is divided into the positive set and negative set. 2) Calculating the Opinion Strength: The polarity strength of opinion words could be calculated as follows. O S p = Sign ( SE T ( p ))
Figure 4. (a) Product brand page, (b) Downloaded file structure, (c) Product information.
B. Extracting Product Reviews and Information From the camera “Nikon D3100” HTML page, we can use XPath [7] to extract five kinds of information which is 1) Helpful: how many people think this review was helpful, 2) Star: product rating, 3) Title: review title, 4) Date: release date of a review, and 5) Review: review text, as shown in Fig. 5.
Figure 5. Product reviews and information.
C. Splitting Product Review Texts into Sentences Then, we parse a product review to split texts into sentences, and produce POS (part of speech) tags, such as noun, verb, adjective, etc., for each word. The POS tagger (or called TreeTagger) developed at the University of Stuttgart [21] in annotating words with POS tags is employed. TreeTagger has been verified to achieve 96.36% accuracy on Penn-Treebank data. D. Subsequent Pages Identifying Sentence Polarity First, this step is to determine the polarity of opinion words, and then to identify sentence polarity. In the system, only the adjectives in product reviews are used as opinion words. 1) Extracting Opinion Words: We extract opinion words using a dictionary-based approach (i.e., by procedure
186
CS ( p) Set ( p )
where p is an adjective, Set(p) is the positive set or negative set based on the polarity of p, CS(p) is the closed set extended by p using synonyms, and OSp is the opinion strength of p in the range [-1, 1]. Taking the adjective “good” as an example, its polarity is positive and the positive set consists of 4308 elements; CS(“good”) is extended by “good” and has 3879 elements. Then, OSgood can be calculated as 3879/4308= +0.900418. 3) Inverse Document Frequency (IDF): Usually, the opinion strength of p (i.e., OSp) is relatively high if p is a common adjective. Here, we use IDF to reduce the effects of common adjectives and enhance important adjectives. IDF could be calculated as follows. R 1 IDF p = ln( )×γ , γ = RCA p ln( R ) where RCAp is the number of product reviews containing p, R is the number of all product reviews, and Ȗ is a normalization formula making IDF value in the range [0, 1]. 4) Degree of Adverbs: An adverb can modify an adjective (i.e., AdverbˇAdjective) and enhance or weaken the adjective strength or even change the polarity (i.e., notˇAdjective). Degreep represents the degree of an adverb modifying an adjective p. Four levels of adverbs are shown in TABLE I where the weights of high, medium, low, and negative levels are given as 0.6, 0.5, 0.4, and -1, respectively; if no adverb is used to modify an adjective, the weight would be 0.5. TABLE I.
Degree of adverbs
5) Calculating Sentence Polarity: Finally, we use three weights described above to calculate sentence polarity as follows. Sentence p = OS p × IDF p × Degree p
where p is an adjective, OSp is the opinion strength of p, IDFp is inverse document frequency of p, and Degreep is the degree of adverbs modifying p.
2013 IEEE Symposium on Computational Intelligence and Data Mining (CIDM)
E. Building Product XML Files In this section, the product information and sentence polarity would be integrated into an XML file. As shown in Fig. 6, this file consists of three parts: 1) product information (or features), 2) review section describing review information and sentence polarity as illustrated in Fig. 7, and 3) specific section describing other information as illustrated in Fig. 8.
F. Product Ranking Our product ranking system is to rank the products specified by users, not all the products. Users can specify product features such as kind, brand, available date, and price as they need. Then, the system searches matched products and ranks them according to their scores. The product scores could be calculated as follows.
Scorei = APR i × PW i × WPRM i where i is product i, APRi is the Average Polarity of Reviews, PWi is the Popularity Weight, and WPRMi is the Weight of Product Release Month.
Figure 6. File structure.
1) Average Polarity of Reviews (APR): Since a product contains a number of reviews, the average polarity of all reviews should be considered for the product. APR could be calculated as follows. n ¦ j =1 [( Polarityj + HF j ) × WRPD j ] APR i = n where n is the number of reviews, Polarityj is the polarity of review j in the range [-1, 1], HFj is the extent of clicking “helpful” in the range (-0.99, 0.99), and WRPDj is the Weight of Review Post Date in the range (0.36, 0.99). These three factors can be explained as follows. a) Polarity could be calculated as follows.
Polarity j =
¦
k p =1
Sentence p
k b) HF could be calculated as follows. α × [ln( Help j − NotHelp j + 2)] HF j = 10
where Helpj is the number of clicking “helpful” for review j, NotHelpj is the number of clicking “non-helpful”, and Į is for positive or negative. Since the number of clicking “helpful” for each review is not more than 20,000 and ln(20,000) is about 9.903, HF value is in the range (-0.99, 0.99). Here, HF is used to adjust the polarity. Figure 7. Review section.
Figure 8. Specific section.
c) WRPD is modified from [22] and could be calculated as follows. RPD j − t t − min( RPD j ) º WRPD j = exp( ), β = ª« »» 30 × β 30 « where RPDj is the post date of review j, t is the current date, and ȕ normalizes WRPD value in the range (0.36, 0.99). 2) Popularity Weight (PW): The more popular a product is, the more discussion it has. Therefore, we use the number of product reviews to represent the product popularity. PW could be calculated as follows. ln( m i + 1) PWi = ln(m ax( m ) + 1) where mi is the number of reviews for product i, and max(m) is the maximum number of reviews among all products.
2013 IEEE Symposium on Computational Intelligence and Data Mining (CIDM)
187
3) Weight of Product Release Month (WPRM): WPRM is similar to WRPD in the calculation as follows. PRM i − t ª t − min( PRM i ) º ), β = « WPRM i = exp( »» 12 × β 12 « where PRMi is the release month of product i, t is the current month, and ȕ normalizes WPRM value in the range (0.36, 0.99). G. User Interface We have implemented a user interface through which users can specify products and/or their features (e.g. quality, power, etc.). Through the product ranking system, users can get back the ranking results of all matched products. As shown in Fig. 9, three functional tags are provided in the user interface: 1) creating product XML files - downloading data from a product website and constructing product XML files, 2) selecting products - specifying a product kind, and selecting some specific products which would be filtered later using prices and/or features specified by users, and 3) ranking results displaying the ranking results of all matched products.
b) Setting the Polarity of the Seed List: Users can define a few common adjectives in the seed list, and then all synonyms and antonyms of the words in the seed list are found using WordNet. Finally, the result set is divided into the positive and negative set, used to determine the adjective polarity. c) Setting Degrees of Adverbs: Users can define four levels of adverbs to enhance or weaken the adjective strength or even change the polarity. d) Creating Product XML Files: The system extracts product reviews and information from the HTML file, and then splits the reviews into sentences. Finally, it creates product XML files by pressing buttons “Set Polarity”, “Set IDF”, and “Set Degree”.
Figure 10. Page of creating product XML files.
Figure 9. User interface.
IV.
IMPLEMENTATIONS
A. Developing Environment The product ranking system was implemented in Java and conducted on an Intel Core 2 Duo E7200 2533MHz CPU with 2G main memory in Window XP professional. B. Functional Design In this system, we provide three functional pages for users: 1) creating product XML files, 2) selecting products, and 3) ranking results. 1) Creating Product XML Files: As shown in Fig. 10, users can download data from a product website and construct product XML files through four steps as follows. a) Downloading Dataset: Users can specify a product kind and brand website where all matched products and product reviews can be found and downloaded as an HTML file.
188
2) Selecting Products: After clicking tag “Selecting Products”, users indicate the file folder storing the XML files, and then the system reads all product data. As shown in Fig. 11, users can specify a product kind, and select some specific products which would be filtered later using prices and/or features specified by users. The conditions which can be specified by users are listed as follows. a) Kind: Users can specify a product kind of which all products would be read into a tree structure, sorted in an alphabetical order. b) Selecting Products: Users can select some specific products or all products. c) Price: Users can specify a price range used to filter the selected products. d) Feature: Users can also specify product features used to capture the sentences with the features in these selected products. Finally, pressing button “Execute” would retrieve the sentences with the specified features, and then calculate the score of each matched product.
2013 IEEE Symposium on Computational Intelligence and Data Mining (CIDM)
TABLE II.
Dataset
Figure 11. Page of selecting products.
3) Ranking Results: After clicking tag “Ranking Result”, the system would display the ranking results of all matched products, as shown in Fig. 12. On the left-hand side, products are ranked based on their scores from high to low. Users can also view the product information and reviews on the righthand side by clicking a specific product.
Figure 13. Release year distribution of top-ten cameras with specified features.
Figure 14. Release year distribution of top-ten laptops with specified features. Figure 12. Page of ranking results.
C. Experimental Results Here, the dataset used in the experiment is downloaded from the Amazon product home page; three kinds of products tested in the system are “camera”, “laptop”, and “mobile phone”, as shown in TABLE II. In the dataset from the Amazon product home page, the release months of products (i.e., PRM) are only provided for “camera” and “laptop”, but not for “mobile phone”. According to the formula used to calculate product scores, the popularity weight (i.e., PW) is favorable for old products whereas the weight of product release month (i.e., WPRM) is favorable for new products. Next, we would like to observe what ranking happens to new and old products in these three kinds. In this experiment, without specifying a price range, we test five individual features for these three kinds of products. As shown in Fig. 13, Fig. 14, and Fig. 15, the release year distribution of top-ten products with specified features is found, respectively for “camera”, “laptop”, and “mobile phone”.
Figure 15. Release year distribution of top-ten mobile phones with specified features.
As shown in Fig. 13, no cameras released in 2011 are ranked top-ten, although WPRM has been counted in. Probably, their popularity is not enough or the average polarity of reviews is not positive enough. Also as shown in Fig. 14, many laptops
2013 IEEE Symposium on Computational Intelligence and Data Mining (CIDM)
189
released in 2011 are ranked top-ten because WPRM dominates over others in calculating product scores. In fact, this can be verified from that the number of reviews (or the popularity) in laptops is far less than cameras and mobile phones. Finally, since no WPRM is counted in, mobile phones released in 2011 are not the majority in top-ten. As shown in Fig. 15, the release year distribution of top-ten mobile phones seems a little balanced. Furthermore, in order to verify the ranking is relevant, we also show the average stars of top-ten cameras, laptops, and mobile phones in Fig. 16. Almost all the average stars in topten products are more than 3.5, especially for cameras and laptops.
[2]
[3]
[4]
[5]
[6]
[7] [8]
[9]
[10]
[11]
Figure 16. Average stars of top-ten cameras, laptops, and mobile phones.
V.
CONCLUSIONS
Online shopping will become increasingly important as more and more manufacturers sell products on the Internet, and many users are using the Internet to express and share their opinions. Thus, our goal is to find favorable or interesting products for an individual user among a huge amount of products. In this paper, we propose a product ranking system where users can specify product features to get back the ranking results of all matched products. We use opinion mining techniques to identify the sentence polarity in product reviews, and then calculate the scores of all matched products using the defined formulas. The experimental results show that the system is practical and the ranking results are interesting. Especially, the system can be used to find the release year distribution of top-ten products with specified features. The results reveal that new products are not always more favorable than old products. ACKNOWLEDGMENT This work was supported by National Science Council of R.O.C. under Grant NSC100-2218-E-224-011-MY3.
[12]
[13]
[14] [15]
[16]
[17]
[18]
[19]
[20] [21]
[22]
REFERENCES [1]
190
M. Ganapathibhotla and B. Liu, “Mining opinions in comparative sentences,” Proc. the 22nd International Conference on Computational Linguistics, pages. 241-248, 2008. P. Han, J. Du, and L. Chen, “Web opinion mining based on sentiment phrase classification vector,” Proc. the 2nd International Conference on Network Infrastructure and Digital Content, pages. 308-312, 2010. R. Xu and C. Kit, “Corse-fine opinion mining,” Proc. International Conference on Machine Learning and Cybernetics, pages. 3469-3474, 2009. L. Yu, J. Ma, S. Tsuchiya, and F. Ren, “Opinion mining: a study on semantic orientation analysis for online document,” Proc. the 7th World Conference on Intelligent Control and Automation, pages. 4548-4552, 2008. Z. Zhang, Y. Li, Q. Ye, and R. Law, “Sentiment classification for Chinese product reviews using an unsupervised Internet-based method,” Proc. the 15th International Conference on Management Science and Engineering, pages. 3-9, 2008. XPath (XML Path Language), http://www.w3.org/TR/xpath20/ E. D. Brill, A Corpus-based Approach to Language Learning, Ph.D. Dissertation, Department of Computer and Information Science, University of Pennsylvania, 1993. B. B. Greene and G. M. Rubin, “Automatic grammatical tagging of English,” Technical Report, Department of Linguistics, Brown University, 1971. L. R. Bahl and R. L. Mercer, “Part-of-speech assignment by a statistical decision algorithm,” Proc. the IEEE International Symposium on Information Theory, pages. 88-89, 1976. K. W. Church, “A stochastic parts program and noun phrase parser for unrestricted text,” Proc. the 2nd International Conference on Applied Natural Language Processing, pages. 136-143, 1988. D. Cutting, J. Kupiec, J. Pedersen, and P. Sibun, “A practical part-of speech tagger,” Proc. the 3rd International Conference on Applied Natural Language Processing, pages. 133-140, 1992. S. J. DeRose, “Grammatical category disambiguation by statistical optimization,” Computational Linguistics, Vol. 14, No.1, pages. 31-39, 1988. A. Kempe, “A probabilistic tagger and an analysis of tagging errors,” Technical Report, IMS, Universit at Stuttgart, pages. 1-16, 1993. S. Federici and V. Pirrelli, “Context-sensitivity and linguistic structure in analogy-based parallel networks,” Current Issues in Mathematical Linguistics, Elsevier, pages. 353-362, 1994. H. Schmid, “Part-of-speech tagging with neural networks,” Proc. the 15th International Conference on Computational Linguistics, pages. 172-176, 1994. P. D. Turney and M. L. Littman, “Measuring praise and criticism: inference of semantic orientation from association,” ACM Transactions on Information Systems, Vol. 21, pages. 315-346, 2003. P. D. Turney, “Thumbs up or thumbs down? semantic orientation applied to unsupervised classification of reviews,” Proc. the 40th ACL Annual Meeting on Association for Computational Linguistics, pages. 417-424, 2002. M. Hu and B. Liu, “Mining and summarizing customer reviews,” Proc. the ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages. 168-177, 2004. WordNet 2.1 for Windows, http://wordnet.princeton.edu/wordnet/ H. Schmid, “Probabilistic part-of-speech tagging using decision trees,” Proc. the International Conference on New Methods in Language Processing, pages. 44-49, 1994. Q. Miao and Q. Li, “AMAZING: A sentiment mining and retrieval system,” Expert Systems with Applications, Vol. 36, No.3, pages. 71927198, 2009.
P. Tian, Y. Liu, M. Liu, and S. Zhu, “Research of product ranking technology based on opinion mining,” Proc. the 2nd International Conference on Intelligent Computation Technology and Automation, pages. 239-243, 2009.
2013 IEEE Symposium on Computational Intelligence and Data Mining (CIDM)