Created
March 24, 2019 04:06
-
-
Save scottenriquez/8288baae4ed6c6e89ea9949759763235 to your computer and use it in GitHub Desktop.
Sentiment TypeScript definition
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module 'sentiment' { | |
interface ConstructorOptions { | |
} | |
interface AnalyzeOptions { | |
extras: any; | |
language: string; | |
} | |
interface AnalyzeResponse { | |
score: number; | |
comparative: number; | |
tokens: Array<string>; | |
words: Array<string>; | |
positive: Array<string>; | |
negative: Array<string>; | |
} | |
class Sentiment { | |
constructor(options?: ConstructorOptions); | |
analyze(phrase: string, opts?: AnalyzeOptions, callback?: Function): AnalyzeResponse; | |
registerLanguage(languageCode: string, language: any): void; | |
} | |
export = Sentiment; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment