Commit ca6bd0ee authored by Joel Oksanen's avatar Joel Oksanen
Browse files
parents ba2d99f3 12d26ff1
......@@ -12,20 +12,21 @@ class ConnectionManager: ObservableObject {
@Published var product = Product()
@Published var messages: [Message] = [Message]()
private let ip = "192.168.0.13"
private let ip = "192.168.1.104"
private let port = "8000"
private var messageQueue: [Message]? = nil
init() {
requestProduct(id: "B0075SUK14")
requestProduct(id: "B000AYW0M2", type: "watch")
// B00RTGK0N0 - red Canon camera
// B004J3V90Y - Canon T3i
// B0012YA85A - Canon Rebel XSI
// B003ZYF3LO - Nikon D3100
// B0075SUK14 - Backpack
}
private func requestProduct(id: String) {
let url = URL(string: "http://" + ip + ":" + port + "/ios_server/product/?id=" + id)!
private func requestProduct(id: String, type: String) {
let url = URL(string: "http://" + ip + ":" + port + "/ios_server/product/?id=" + id + "&type=" + type)!
let task = URLSession.shared.dataTask(with: url) {(data, response, error) in
guard let data = data else { return }
......
\chapter{Feature-dependent sentiment analysis}
\section{Exploration}
\subsection{Sentence-level SA trained on domain-specific data}
\subsection{Feature-dependent SA trained on SemEval-2014 data}
\section{Evaluation}
\ No newline at end of file
\appendix
\chapter{First Appendix}
\ No newline at end of file
\chapter{Extracted ontologies}
\label{sec:ontology_appendix}
\ No newline at end of file
\chapter{Conclusion}
\ No newline at end of file
\chapter{Conclusion}
\section{Further work}
\subsection{Applications}
\ No newline at end of file
\chapter{Evaluation}
\ No newline at end of file
\chapter{Introduction}
In this chapter, we will first discuss the motivations behind the project and then specify its main objectives.
In this chapter, we will first discuss the motivations behind the project and then specify its main objectives and contributions.
\section{Motivations}
People spend an ever growing share of their earnings online, from purchasing daily necessities on e-commerce sites such as Amazon\footnote{https://www.amazon.com/} to streaming movies on services such as Netflix\footnote{https://www.netflix.com/}. As the market shifts online, people's purchase decisions are increasingly based on product reviews either accompanying the products on their e-commerce sites, or on specialised review websites, such as Rotten Tomatoes\footnote{https://www.rottentomatoes.com/} for movies. These reviews can be written by fellow consumers who have purchased the product or by professional critics, such as in the latter example, but what unites most online review platforms is the massive number of individual reviews: a particular type of electronic toothbrush can have more than 10,000 reviews on Amazon\footnote{https://www.amazon.com/Philips-Sonicare-Electric-Rechargeable-Toothbrush/dp/B00QZ67ODE/}. As people cannot possibly go through all of the individual reviews, purchase decisions are often based on various kinds of review aggregations. The presentation of a review aggregation must be concise and intuitive in order to be effective, but it must also retain some nuances of the original reviews, so that consumers can understand \textit{why} a product is considered good or bad and if the arguments align with their individual preferences. \par
Clear explanations of review aggregations are also central to the success of e-commerce site recommender systems, as it has been shown that explanations can help to improve the overall acceptance of a recommender system \cite{RefWorks:doc:5e2f3970e4b0241a7d69e2a4} and their recommendations are often largely based on other consumers' reviews.
People spend an ever growing share of their earnings online, from purchasing daily necessities on e-commerce sites such as Amazon to streaming movies on services such as Netflix. As the market shifts online, people's purchase decisions are increasingly based on product reviews either accompanying the products on e-commerce sites, or on specialised review websites, such as Rotten Tomatoes\footnote{https://www.rottentomatoes.com/} for movies. These reviews can be written by fellow consumers who have purchased the product or by professional critics, such as in the latter example, but what unites most online review platforms is the massive number of individual reviews: a single wrist watch can have more than 20,000 reviews on Amazon\footnote{https://www.amazon.co.uk/Casio-Collection-Unisex-Adults-F-91W-1YER/dp/B000J34HN4}. As people cannot possibly go through all of the individual reviews, purchase decisions are often based on various kinds of review aggregations. The presentation of a review aggregation must be concise and intuitive in order to be effective, but it must also retain some nuances of the original reviews, so that consumers can understand \textit{why} a product is considered good or bad and if the arguments align with their individual preferences. \par
Explanations of review aggregations are also relevant to e-commerce site recommender systems, as the recommendations are often largely based on existing consumer reviews. It has been shown that explanations can help to improve the overall acceptance of a recommender system \cite{RefWorks:doc:5e2f3970e4b0241a7d69e2a4}, and therefore insightful explanations of review aggregations are important to their effectiveness.
\section{Objectives}
There have already been some attempts to improve explanations for review aggregations, some of which are discussed in Chapter 2. One such attempt is what is called an Argumentative Dialogical Agent (ADA), proposed by Cocarascu et al.\ \cite{RefWorks:doc:5e08939de4b0912a82c3d46c} and implemented for the Rotten Tomatoes and Trip Advisor\footnote{https://www.tripadvisor.com/} platforms \cite{RefWorks:doc:5e0de20ee4b055d63d355913}. The goal of this project is to extend upon the work of Cocarascu et al. in order to design and implement a more generalised ADA to provide explanations for Amazon product reviews. The main objectives for the extended agent are threefold:
Some systems have already been proposed to improve explanations for review aggregations, a few of which are discussed in Chapter 2. One such system is what is called an Argumentative Dialogical Agent (ADA), proposed by Cocarascu et al.\ in \cite{RefWorks:doc:5e08939de4b0912a82c3d46c}, which has been explored in the movie and hotel review domains of Rotten Tomatoes \cite{RefWorks:doc:5e08939de4b0912a82c3d46c} and Trip Advisor\footnote{https://www.tripadvisor.com/} \cite{RefWorks:doc:5e0de20ee4b055d63d355913}, respectively. ADA provides the user with insight about reviews for a particular product through conversation centred around the product's features. Cocarascu et al.\ provide the following example of a conversation about the film \textit{The Post}:
\begin{table*}
\centering
\begin{tabular}{@{}p{1cm}p{\textwidth-4cm}}
\textbf{User}:&\textit{Why was The Post highly rated?}\\
\textbf{ADA}:&\textit{The movie was highly rated because the \textbf{acting} was great, although the \textbf{writing} was poor.}\\
\textbf{User}:&\textit{Why was the acting considered to be great?}\\
\textbf{ADA}:&\textit{Its acting was considered to be great because \textbf{Meryl Streep} was great.}\\
\textbf{User}:&\textit{What did critics say about Meryl Streep being great?}\\
\textbf{ADA}:&\textit{"...Streep’s hesitations, rue, and ultimate valor are soul-deep..."}\\
\end{tabular}
\end{table*}
\newpage
In order to participate in such dialog, ADA has to have knowledge about the \textit{ontology} of the product (i.e. \textit{acting} is a sub-category of \textit{film} and \textit{Meryl Streep} is a sub-category of \textit{acting}), as well as knowledge about the reviewers' sentiments towards the various aspects of the film. ADA obtains some of this knowledge from the review texts using \textit{natural language processing} (NLP) methods. In the papers by Cocarascu et al., the ontologies for films and hotels are mostly given, although mining some aspects from the review texts was also experimented with. The opinions of reviewers were extracted from the review texts using \textit{sentiment analysis} (SA) methods.
The objective of this project is to extend upon the work of Cocarascu et al. in order to design and implement a more generalised ADA to provide explanations for any product reviews on Amazon. As Amazon contains reviews for products ranging from pet supplies to digital music and car parts, this involves taking a more unsupervised and domain-independent approach to the various NLP tasks within the agent, as well as considering the effects of such variance on the dialogue between the user and the agent. Furthermore, ADA's complex methodology has never before been implemented within a fully developed end-to-end system, presenting a considerable software engineering challenge.
\section{Contributions}
The main contributions of this project are threefold:
\begin{enumerate}
\item We propose and implement a novel method for domain-independent product ontology extraction, which allows us to build a \textit{feature-based representation} of any product in an unsupervised manner, an example of which is shown in Figure \ref{fig:toothbrushrepresentation} for wrist watches. The ontologies extracted with this method display significantly higher recall when compared to the widely used manually and autonomously annotated semantic networks WordNet and ConceptNet, respectively.
\item We implement a modified version of the method by Gao et al.\ \cite{RefWorks:doc:5ed3c3bbe4b0445db7f0a369} for feature-dependent sentiment analysis, which allows us to assess the reviewers' sentiment towards the various features of the product, whilst improving upon the accuracy of the phrase-level sentiment analysis in \cite{RefWorks:doc:5e08939de4b0912a82c3d46c}.
\item We implement ADA for the first time and from scratch as a fully developed system, with a backend agent including the aforementioned enhancements and a user-facing iOS chat application, which is shown in Figure \ref{fig:toothbrushscreenshot}.
\end{enumerate}
For both 1.\ and 2.\ we use BERT, a language model proposed by Devlin et al.\ \cite{RefWorks:doc:5e8dcdc3e4b0dba02bfdfa80}, which has produced state-of-the-art results in a wide variety of different NLP tasks.
\vspace{2cm}
\begin{figure}[h]
\centering
\begin{forest}
for tree = {l=2cm}
[watch
[band
[links]
[leather]
[clasp]
]
[face
[hands]
[size]
[color]
]
[price]
[quality]
[size]
[look]
[battery]
[\dots]
]
\end{forest}
\caption{Feature-based representation for a wrist watch}
\label{fig:toothbrushrepresentation}
\end{figure}
\begin{figure}[b]
\centering
\frame{\includegraphics[height=15cm]{images/watch_screenshot.png}}
\caption{A conversation between the user and ADA on the iOS app about a wrist watch}
\label{fig:toothbrushscreenshot}
\end{figure}
\begin{itemize}
\item \textbf{Generalise} the agent to work with a larger variety of different products. Currently ADA has only been implemented for movie and hotel reviews, two highly homogeneous domains in which there is not much variance in key features and review language from one product to another. Implementing ADA for Amazon reviews will require more general NLP methods in extracting review aggregations.
\item \textbf{Enhance dialogue} between the user and the agent to support conversational search. Currently, the agent is able to respond to a limited number of questions centred solely around explanations for a single product review aggregation. Given the large amounts of current research into explainable recommender systems and the potential of ADA in this domain, we will extend its dialogue to support conversational search.
\item \textbf{Learn} from user feedback. The enhanced agent should be able to query and implement information and opinions provided by the user to improve its review aggregations and product recommendations.
\end{itemize}
In addition to the above, we will implement a conversational user interface for the ADA on the Alexa\footnote{https://www.amazon.com/b?\&node=13727921011/} virtual assistant. The user interface will provide the user with a novel way to obtain explainable product recommendations using voice commands on Alexa-compatible smart speakers.
......@@ -13,6 +13,13 @@
\usepackage{graphicx}
\usepackage[colorinlistoftodos]{todonotes}
\usepackage[colorlinks=true, allcolors=blue]{hyperref}
\usepackage[edges]{forest}
\usepackage{multirow}
\usepackage{listings}
\lstset{basicstyle=\ttfamily\footnotesize,breaklines=true}
\renewcommand{\figurename}{Listing}
\usepackage{float}
\usepackage{amsthm}
%% \DeclareMathSymbol{\Alpha}{\mathalpha}{operators}{"41}
......@@ -37,7 +44,7 @@
\theoremstyle{def}
\newtheorem{definition}{Definition}[chapter]
\title{Project Title}
\title{ADA Loves BERT: A System for Domain-Independent Feature-Based Product Review Aggregation}
\author{Joel Oksanen}
% Update supervisor and other title stuff in title/title.tex
......@@ -59,8 +66,9 @@ Your acknowledgements go here
\input{introduction/introduction.tex}
\input{background/background.tex}
\input{project/project.tex}
\input{evaluation/evaluation.tex}
\input{feature_extraction/feature_extraction.tex}
\input{SA/SA.tex}
\input{system/system.tex}
\input{conclusion/conclusion.tex}
\input{appendix/appendix.tex}
......
\chapter{Project}
\ No newline at end of file
\chapter{System}
\section{Architecture}
\subsection{Backend}
\subsection{iOS botplication}
\section{Evaluation}
\subsection{Performance}
\subsection{User evaluation}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment