From 6f6e5c763d9a398e897df94b89fcc7d3845c318e Mon Sep 17 00:00:00 2001
From: ab <abdullah_ahmed@brown.edu>
Date: Fri, 30 Aug 2019 17:57:39 -0400
Subject: minor fixes

---
 src/client/ClientRecommender.tsx | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

(limited to 'src/client/ClientRecommender.tsx')

diff --git a/src/client/ClientRecommender.tsx b/src/client/ClientRecommender.tsx
index a6d1a32b3..9953700cc 100644
--- a/src/client/ClientRecommender.tsx
+++ b/src/client/ClientRecommender.tsx
@@ -39,6 +39,7 @@ export class ClientRecommender extends React.Component<RecommenderProps> {
     @action
     public reset_docs() {
         ClientRecommender.Instance.docVectors = new Set();
+        ClientRecommender.Instance.mainDoc = undefined;
         ClientRecommender.Instance.corr_matrix = [[0, 0], [0, 0]];
     }
 
@@ -133,7 +134,10 @@ export class ClientRecommender extends React.Component<RecommenderProps> {
             let keyterms = new List<string>();
             results.documents.forEach((doc: any) => {
                 let keyPhrases = doc.keyPhrases;
-                keyPhrases.map((kp: string) => keyterms.push(kp));
+                keyPhrases.map((kp: string) => {
+                    const words = kp.split(" ");
+                    words.forEach((word) => keyterms.push(word));
+                });
             });
             return keyterms;
         };
-- 
cgit v1.2.3-70-g09d2

