# Dual-Track Lifelong Machine Learning-Based Fine-Grained Product Quality Analysis
## 3 Fine-Grained Sentiment Analysis and Dual-Track System
### Named-Entity Recognition for Lifelong Learning  
Section 3.1 mentioned that the first step of fine-grained sentiment analysis is feature recognition. This detection needs NER, which is a common task in NLP and has many existing approaches.  
In this work, a context-based approach is proposed for NER. This design is inspired by the concept of the \"environment\" of reinforcement learning. In NLP, the context of a word is its environment. When a word is mentioned, the NER algorithm should check the environment before giving a result. The environment can be set by humans or detected by AI. In most of the tasks, the background is known to determine the environment before NER. For instance, in the sentiment classification of an iPhone product review, the environment can be set as an electronic device, so \"Apple\" in this environment must be a company rather than a fruit. If the environment is unknown, AI can also read the context and determine it by itself. When it reads \"battery\", \"screen\", etc., it can also know the environment is irrelevant to fruit.  
An environment contains plenty of entities, a knowledge graph (Figure A5 in Appendix B.2 provides an example) can provide information on the entities. Then when the machine is learning, it knows how to observe which entities. The entities in this knowledge graph also describe a close environment. The word \"Apple\" hardly refers to the fruit in the environment. In other words, the environment's setting can prevent ambiguity.  
If the expert systems want to judge a product review, they should first know which product or feature is being referred to. Secondly, they need to build a relationship between the description and rating. NER can tell the machine which entities a sentence includes.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Sentence** & **Feature** & **Score** \\ \hline I was really scared about obtaining a damaged product, & Not related to product & None \\ I read the reviews every day until it came & & Shipping & 5 \\ shipping was **fast** and the package came 1 day early. & Battery life & 4 \\ battery was **fast** \& **17** was hopping 90 or me. & Not related to product & None \\  & & & Appearance damage & 3 \\ I did have some **scuffs** at the top of the phone tho and & & & \\   near the charging port. & & & \\   the what hands on the Side also look a little **dingy**. & & & \\ My **seller** was CHUBIBISTECH... & & & \\  & & & \\  & & & \\  & & & \\ \hline \hline \end{tabular}
\end{table}
Table 1: Fine-grained sentiment classification example.  
Then reinforcement learning can build the relationship between the entity's description and the rating.  
Once the features are found from the review, the algorithm needs to determine their value. In the knowledge graph, there are possible values of the features. Thus, the algorithm can determine the feature values by rules and patterns.  
Table 2 shows some patterns of reviews that describe battery life, where \"Adj\" stands for adjective and \"Ratio\" stands for the percentage of batter capacity. Thus, it is possible to create rules to match the reviews for battery life. The above patterns are insufficient to find, but expert systems can easily add more patterns.  
For a mobile phone, the essential parts are the battery and screen [26]. For a renewed phone, the most common problems are low battery life and damage to the screen. Thus, this work creates rules to define the battery life and damage to the screen. Table 2 shows some patterns of reviews that describe battery life. Thus, it is possible to create rules to match the reviews for the battery life. The above patterns are insufficient to find all, but this approach is flexible and easily adds more patterns.  
However, all of the rules are defined by humans in a traditional expert system, so it is impossible to let such an ES teach humans. Thus, this work proposes the use of reinforcement learning to mine knowledge and create rules.