aboutsummaryrefslogtreecommitdiff
path: root/src/client/apis/IBM_Recommender.ts
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-03-09 19:47:45 -0400
committerGitHub <noreply@github.com>2020-03-09 19:47:45 -0400
commit7fa0783cdc37a70dc8d967188a27d50f269042cc (patch)
treebaa864643547ba264e85a09ad878818ab3cf7111 /src/client/apis/IBM_Recommender.ts
parentcabb2cf9065d85112f1bd89e31b41dafdbc4ba54 (diff)
parent08aa3b6fc47cb7719c5690c176d05db36e724382 (diff)
Merge pull request #345 from browngraphicslab/audio_refactor
Audio refactor
Diffstat (limited to 'src/client/apis/IBM_Recommender.ts')
-rw-r--r--src/client/apis/IBM_Recommender.ts66
1 files changed, 33 insertions, 33 deletions
diff --git a/src/client/apis/IBM_Recommender.ts b/src/client/apis/IBM_Recommender.ts
index da6257f28..4e1c541c8 100644
--- a/src/client/apis/IBM_Recommender.ts
+++ b/src/client/apis/IBM_Recommender.ts
@@ -1,40 +1,40 @@
-import { Opt } from "../../new_fields/Doc";
+// import { Opt } from "../../new_fields/Doc";
-const NaturalLanguageUnderstandingV1 = require('ibm-watson/natural-language-understanding/v1');
-const { IamAuthenticator } = require('ibm-watson/auth');
+// const NaturalLanguageUnderstandingV1 = require('ibm-watson/natural-language-understanding/v1');
+// const { IamAuthenticator } = require('ibm-watson/auth');
-export namespace IBM_Recommender {
+// export namespace IBM_Recommender {
- // pass to IBM account is Browngfx1
+// // pass to IBM account is Browngfx1
- const naturalLanguageUnderstanding = new NaturalLanguageUnderstandingV1({
- version: '2019-07-12',
- authenticator: new IamAuthenticator({
- apikey: 'tLiYwbRim3CnBcCO4phubpf-zEiGcub1uh0V-sD9OKhw',
- }),
- url: 'https://gateway-wdc.watsonplatform.net/natural-language-understanding/api'
- });
+// const naturalLanguageUnderstanding = new NaturalLanguageUnderstandingV1({
+// version: '2019-07-12',
+// authenticator: new IamAuthenticator({
+// apikey: 'tLiYwbRim3CnBcCO4phubpf-zEiGcub1uh0V-sD9OKhw',
+// }),
+// url: 'https://gateway-wdc.watsonplatform.net/natural-language-understanding/api'
+// });
- const analyzeParams = {
- 'text': 'this is a test of the keyword extraction feature I am integrating into the program',
- 'features': {
- 'keywords': {
- 'sentiment': true,
- 'emotion': true,
- 'limit': 3
- },
- }
- };
+// const analyzeParams = {
+// 'text': 'this is a test of the keyword extraction feature I am integrating into the program',
+// 'features': {
+// 'keywords': {
+// 'sentiment': true,
+// 'emotion': true,
+// 'limit': 3
+// },
+// }
+// };
- export const analyze = async (_parameters: any): Promise<Opt<string>> => {
- try {
- const response = await naturalLanguageUnderstanding.analyze(_parameters);
- console.log(response);
- return (JSON.stringify(response, null, 2));
- } catch (err) {
- console.log('error: ', err);
- return undefined;
- }
- };
+// export const analyze = async (_parameters: any): Promise<Opt<string>> => {
+// try {
+// const response = await naturalLanguageUnderstanding.analyze(_parameters);
+// console.log(response);
+// return (JSON.stringify(response, null, 2));
+// } catch (err) {
+// console.log('error: ', err);
+// return undefined;
+// }
+// };
-} \ No newline at end of file
+// } \ No newline at end of file