aboutsummaryrefslogtreecommitdiff
path: root/src/client/ClientRecommender.tsx
diff options
context:
space:
mode:
authorStanley Yip <stanley_yip@brown.edu>2020-02-09 14:58:57 -0500
committerStanley Yip <stanley_yip@brown.edu>2020-02-09 14:58:57 -0500
commitf6179334d6f2942631caa17b7c8ae2531d87c7c4 (patch)
tree091da0ef7bedb900c958c28cebe4058fade644cf /src/client/ClientRecommender.tsx
parent07141291bee793955d7061f4e479942d7aceda67 (diff)
parent87167fd126e161b29d8d798a5f04e3cf159aae16 (diff)
recommender system works
Diffstat (limited to 'src/client/ClientRecommender.tsx')
-rw-r--r--src/client/ClientRecommender.tsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/ClientRecommender.tsx b/src/client/ClientRecommender.tsx
index 83aed0204..cb1674943 100644
--- a/src/client/ClientRecommender.tsx
+++ b/src/client/ClientRecommender.tsx
@@ -14,10 +14,10 @@ import { JSXElement } from "babel-types";
import { RichTextField } from "../new_fields/RichTextField";
import { ToPlainText } from "../new_fields/FieldSymbols";
import { listSpec } from "../new_fields/Schema";
-import { Identified } from "./Network";
import { ComputedField } from "../new_fields/ScriptField";
import { ImageField } from "../new_fields/URLField";
import { KeyphraseQueryView } from "./views/KeyphraseQueryView";
+import { Networking } from "./Network";
export interface RecommenderProps {
title: string;
@@ -103,7 +103,7 @@ export class ClientRecommender extends React.Component<RecommenderProps> {
public computeSimilarities(distance_metric: string) {
const parameters: any = {};
- Identified.PostToServer("/IBMAnalysis", parameters).then(response => {
+ Networking.PostToServer("/IBMAnalysis", parameters).then(response => {
console.log("ANALYSIS RESULTS! ", response);
});
ClientRecommender.Instance.docVectors.forEach((doc: RecommenderDocument) => {
@@ -274,7 +274,7 @@ export class ClientRecommender extends React.Component<RecommenderProps> {
}
}
};
- await Identified.PostToServer("/IBMAnalysis", parameters).then(response => {
+ await Networking.PostToServer("/IBMAnalysis", parameters).then(response => {
const sorted_keywords = response.result.keywords;
if (sorted_keywords.length > 0) {
console.log("IBM keyphrase", sorted_keywords[0]);