Using Quantum Natural Language Processing for Sentiment Classification and Next-Word Prediction in Sentences Without Fixed Syntactic Structure
Abstract
Quantum Computing is envisioned as one of the scientific areas with greater transformative potential. Already there exist applications running in quantum devices for different areas, like cybersecurity, chemistry, or machine learning. One subarea being developed under quantum machine learning is quantum natural language processing. Following the promising results existing in problems like sentiment classification or next-word prediction, this paper presents two proofs of concept to demonstrate how these two tasks can be solved using quantum computing. For the first task showcased, sentiment classification, we employ the removal of caps and cups morphisms to make the string diagrams simpler and more efficient. In the case of next-word prediction, we show how to solve the task for sentences with previously unknown syntactic structures by applying a classical Random Forest machine learning algorithm that classifies the syntactic structure and enables our QNLP algorithm to infer the proper string model.