aboutsummaryrefslogtreecommitdiff
path: root/src/client/ClientRecommender.tsx
diff options
context:
space:
mode:
authorab <abdullah_ahmed@brown.edu>2019-08-30 17:57:39 -0400
committerab <abdullah_ahmed@brown.edu>2019-08-30 17:57:39 -0400
commit6f6e5c763d9a398e897df94b89fcc7d3845c318e (patch)
treef6d9ddb87bac384d0210382bf61ad8b23ed9f962 /src/client/ClientRecommender.tsx
parente0bfe978e029268b3901b5d098f946b1a6fc7d0d (diff)
minor fixes
Diffstat (limited to 'src/client/ClientRecommender.tsx')
-rw-r--r--src/client/ClientRecommender.tsx6
1 files changed, 5 insertions, 1 deletions
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;
};