eventregistry 8.11.2 → 9.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analytics.d.ts +82 -82
- package/dist/analytics.js +336 -330
- package/dist/analytics.js.map +1 -1
- package/dist/base.d.ts +82 -81
- package/dist/base.js +261 -219
- package/dist/base.js.map +1 -1
- package/dist/counts.d.ts +81 -81
- package/dist/counts.js +162 -149
- package/dist/counts.js.map +1 -1
- package/dist/dailyShares.d.ts +10 -10
- package/dist/dailyShares.js +90 -77
- package/dist/dailyShares.js.map +1 -1
- package/dist/data.d.ts +269 -268
- package/dist/data.js +3 -3
- package/dist/eventForText.d.ts +48 -48
- package/dist/eventForText.js +126 -123
- package/dist/eventForText.js.map +1 -1
- package/dist/eventRegistry.d.ts +244 -224
- package/dist/eventRegistry.js +1098 -1018
- package/dist/eventRegistry.js.map +1 -1
- package/dist/index.d.ts +21 -20
- package/dist/index.js +128 -122
- package/dist/index.js.map +1 -1
- package/dist/info.d.ts +61 -61
- package/dist/info.js +171 -158
- package/dist/info.js.map +1 -1
- package/dist/logger.d.ts +44 -0
- package/dist/logger.js +144 -0
- package/dist/logger.js.map +1 -0
- package/dist/query.d.ts +53 -53
- package/dist/query.js +333 -290
- package/dist/query.js.map +1 -1
- package/dist/queryArticle.d.ts +61 -61
- package/dist/queryArticle.js +183 -168
- package/dist/queryArticle.js.map +1 -1
- package/dist/queryArticles.d.ts +144 -160
- package/dist/queryArticles.js +729 -701
- package/dist/queryArticles.js.map +1 -1
- package/dist/queryEvent.d.ts +140 -140
- package/dist/queryEvent.js +587 -569
- package/dist/queryEvent.js.map +1 -1
- package/dist/queryEvents.d.ts +210 -210
- package/dist/queryEvents.js +825 -798
- package/dist/queryEvents.js.map +1 -1
- package/dist/queryMentions.d.ts +96 -96
- package/dist/queryMentions.js +637 -600
- package/dist/queryMentions.js.map +1 -1
- package/dist/queryStory.d.ts +58 -58
- package/dist/queryStory.js +194 -174
- package/dist/queryStory.js.map +1 -1
- package/dist/recent.d.ts +23 -23
- package/dist/recent.js +199 -179
- package/dist/recent.js.map +1 -1
- package/dist/returnInfo.d.ts +68 -66
- package/dist/returnInfo.js +332 -304
- package/dist/returnInfo.js.map +1 -1
- package/dist/topicPage.d.ts +157 -157
- package/dist/topicPage.js +599 -604
- package/dist/topicPage.js.map +1 -1
- package/dist/trends.d.ts +35 -35
- package/dist/trends.js +115 -102
- package/dist/trends.js.map +1 -1
- package/dist/types.d.ts +2453 -2155
- package/dist/types.js +2 -2
- package/package.json +13 -13
package/dist/analytics.d.ts
CHANGED
|
@@ -1,82 +1,82 @@
|
|
|
1
|
-
import { EventRegistry } from "./eventRegistry";
|
|
2
|
-
import {
|
|
3
|
-
export declare class Analytics {
|
|
4
|
-
private er;
|
|
5
|
-
/**
|
|
6
|
-
* @param eventRegistry: instance of EventRegistry class
|
|
7
|
-
*/
|
|
8
|
-
constructor(er: EventRegistry);
|
|
9
|
-
/**
|
|
10
|
-
* Identify the list of entities and nonentities mentioned in the text
|
|
11
|
-
* @param text input text to annotate
|
|
12
|
-
* @param lang language of the provided document (can be an ISO2 or ISO3 code). If None is provided, the language will be automatically detected
|
|
13
|
-
*/
|
|
14
|
-
annotate(text: string, lang?: string[], customParams?: {
|
|
15
|
-
[name: string]: unknown;
|
|
16
|
-
}): Promise<
|
|
17
|
-
/**
|
|
18
|
-
* Determine the set of up to 5 categories the text is about. Currently, only English text can be categorized!
|
|
19
|
-
* @param text input text to categorize
|
|
20
|
-
* @param taxonomy: which taxonomy use for categorization. Options:
|
|
21
|
-
* - "dmoz" (over 5000 categories in 3 levels, English language only)
|
|
22
|
-
* - "news" (general news categorization, 9 categories, any langauge)
|
|
23
|
-
*/
|
|
24
|
-
categorize(text: string, taxonomy?: "dmoz" | "news"): Promise<
|
|
25
|
-
/**
|
|
26
|
-
* determine the sentiment of the provided text in English language
|
|
27
|
-
* @param text input text to categorize
|
|
28
|
-
* @param method method to use to compute the sentiment. possible values are "vocabulary" (vocabulary based sentiment analysis) and "rnn" (neural network based sentiment classification)
|
|
29
|
-
*/
|
|
30
|
-
sentiment(text: string, method?: string, sentences?: number, returnSentences?: boolean): Promise<
|
|
31
|
-
semanticSimilarity(text1: string, text2: string, distanceMeasure?: "cosine" | "jaccard"): Promise<
|
|
32
|
-
/**
|
|
33
|
-
* Determine the language of the given text
|
|
34
|
-
* @param text input text to analyse
|
|
35
|
-
*/
|
|
36
|
-
detectLanguage(text: string): Promise<
|
|
37
|
-
/**
|
|
38
|
-
* Extract all available information about an article available at url `url`.
|
|
39
|
-
* Returned information will include article title, body, authors, links in the articles,...
|
|
40
|
-
* @param url article url that'll be used for extraction
|
|
41
|
-
* @param proxyUrl proxy that should be used for downloading article information. format: {schema}://{username}:{pass}@{proxy url/ip}
|
|
42
|
-
*/
|
|
43
|
-
extractArticleInfo(url: string, proxyUrl?: string, headers?: {
|
|
44
|
-
[name: string]: unknown;
|
|
45
|
-
}, cookies?: {
|
|
46
|
-
[name: string]: unknown;
|
|
47
|
-
}): Promise<
|
|
48
|
-
/**
|
|
49
|
-
* Extract named entities from the provided text. Supported languages are English, German, Spanish and Chinese.
|
|
50
|
-
* @param text: text on which to extract named entities
|
|
51
|
-
*/
|
|
52
|
-
ner(text: string): Promise<
|
|
53
|
-
/**
|
|
54
|
-
* Create a new topic and train it using the tweets that match the twitterQuery
|
|
55
|
-
* @param twitterQuery string containing the content to search for. It can be a Twitter user account (using "@" prefix or user's Twitter url),a hash tag (using "#" prefix) or a regular keyword.
|
|
56
|
-
* @param args Object which contains a host of optional parameters
|
|
57
|
-
*/
|
|
58
|
-
trainTopicOnTweets(twitterQuery: string, args?:
|
|
59
|
-
/**
|
|
60
|
-
* Create a new topic to train. The user should remember the "uri" parameter returned in the result.
|
|
61
|
-
* @param name name of the topic we want to create
|
|
62
|
-
* @returns object containing the "uri" property that should be used in the follow-up call to trainTopic* methods
|
|
63
|
-
*/
|
|
64
|
-
trainTopicCreateTopic(name: string): Promise<
|
|
65
|
-
/**
|
|
66
|
-
* If the topic is already existing, clear the definition of the topic. Use this if you want to retrain an existing topic
|
|
67
|
-
* @param uri uri of the topic (obtained by calling trainTopicCreateTopic method) to clear
|
|
68
|
-
*/
|
|
69
|
-
trainTopicClearTopic(uri: string): Promise<
|
|
70
|
-
/**
|
|
71
|
-
* Add the information extracted from the provided "text" to the topic with uri "uri".
|
|
72
|
-
* @param uri uri of the topic (obtained by calling trainTopicCreateTopic method)
|
|
73
|
-
* @param text text to analyze and extract information from
|
|
74
|
-
*/
|
|
75
|
-
trainTopicAddDocument(uri: string, text: string): Promise<
|
|
76
|
-
/**
|
|
77
|
-
* Retrieve topic for the topic for which you have already finished training
|
|
78
|
-
* @param uri uri of the topic (obtained by calling trainTopicCreateTopic method)
|
|
79
|
-
* @returns returns the trained topic: { concepts: [], categories: [] }
|
|
80
|
-
*/
|
|
81
|
-
trainTopicGetTrainedTopic(uri: string, args?:
|
|
82
|
-
}
|
|
1
|
+
import { EventRegistry } from "./eventRegistry";
|
|
2
|
+
import { ER } from "./types";
|
|
3
|
+
export declare class Analytics {
|
|
4
|
+
private er;
|
|
5
|
+
/**
|
|
6
|
+
* @param eventRegistry: instance of EventRegistry class
|
|
7
|
+
*/
|
|
8
|
+
constructor(er: EventRegistry);
|
|
9
|
+
/**
|
|
10
|
+
* Identify the list of entities and nonentities mentioned in the text
|
|
11
|
+
* @param text input text to annotate
|
|
12
|
+
* @param lang language of the provided document (can be an ISO2 or ISO3 code). If None is provided, the language will be automatically detected
|
|
13
|
+
*/
|
|
14
|
+
annotate(text: string, lang?: string[], customParams?: {
|
|
15
|
+
[name: string]: unknown;
|
|
16
|
+
}): Promise<ER.Analytics.Response.Annotate>;
|
|
17
|
+
/**
|
|
18
|
+
* Determine the set of up to 5 categories the text is about. Currently, only English text can be categorized!
|
|
19
|
+
* @param text input text to categorize
|
|
20
|
+
* @param taxonomy: which taxonomy use for categorization. Options:
|
|
21
|
+
* - "dmoz" (over 5000 categories in 3 levels, English language only)
|
|
22
|
+
* - "news" (general news categorization, 9 categories, any langauge)
|
|
23
|
+
*/
|
|
24
|
+
categorize(text: string, taxonomy?: "dmoz" | "news"): Promise<ER.Analytics.Response.Categorize>;
|
|
25
|
+
/**
|
|
26
|
+
* determine the sentiment of the provided text in English language
|
|
27
|
+
* @param text input text to categorize
|
|
28
|
+
* @param method method to use to compute the sentiment. possible values are "vocabulary" (vocabulary based sentiment analysis) and "rnn" (neural network based sentiment classification)
|
|
29
|
+
*/
|
|
30
|
+
sentiment(text: string, method?: string, sentences?: number, returnSentences?: boolean): Promise<ER.Analytics.Response.Sentiment>;
|
|
31
|
+
semanticSimilarity(text1: string, text2: string, distanceMeasure?: "cosine" | "jaccard"): Promise<ER.Analytics.Response.SentimentSimilarity>;
|
|
32
|
+
/**
|
|
33
|
+
* Determine the language of the given text
|
|
34
|
+
* @param text input text to analyse
|
|
35
|
+
*/
|
|
36
|
+
detectLanguage(text: string): Promise<ER.Analytics.Response.DetectLanguage>;
|
|
37
|
+
/**
|
|
38
|
+
* Extract all available information about an article available at url `url`.
|
|
39
|
+
* Returned information will include article title, body, authors, links in the articles,...
|
|
40
|
+
* @param url article url that'll be used for extraction
|
|
41
|
+
* @param proxyUrl proxy that should be used for downloading article information. format: {schema}://{username}:{pass}@{proxy url/ip}
|
|
42
|
+
*/
|
|
43
|
+
extractArticleInfo(url: string, proxyUrl?: string, headers?: {
|
|
44
|
+
[name: string]: unknown;
|
|
45
|
+
}, cookies?: {
|
|
46
|
+
[name: string]: unknown;
|
|
47
|
+
}): Promise<ER.Analytics.Response.ExtractArticleInfo>;
|
|
48
|
+
/**
|
|
49
|
+
* Extract named entities from the provided text. Supported languages are English, German, Spanish and Chinese.
|
|
50
|
+
* @param text: text on which to extract named entities
|
|
51
|
+
*/
|
|
52
|
+
ner(text: string): Promise<unknown>;
|
|
53
|
+
/**
|
|
54
|
+
* Create a new topic and train it using the tweets that match the twitterQuery
|
|
55
|
+
* @param twitterQuery string containing the content to search for. It can be a Twitter user account (using "@" prefix or user's Twitter url),a hash tag (using "#" prefix) or a regular keyword.
|
|
56
|
+
* @param args Object which contains a host of optional parameters
|
|
57
|
+
*/
|
|
58
|
+
trainTopicOnTweets(twitterQuery: string, args?: ER.Analytics.TrainTopicOnTweetsArguments): Promise<ER.Analytics.Response>;
|
|
59
|
+
/**
|
|
60
|
+
* Create a new topic to train. The user should remember the "uri" parameter returned in the result.
|
|
61
|
+
* @param name name of the topic we want to create
|
|
62
|
+
* @returns object containing the "uri" property that should be used in the follow-up call to trainTopic* methods
|
|
63
|
+
*/
|
|
64
|
+
trainTopicCreateTopic(name: string): Promise<ER.Analytics.Response>;
|
|
65
|
+
/**
|
|
66
|
+
* If the topic is already existing, clear the definition of the topic. Use this if you want to retrain an existing topic
|
|
67
|
+
* @param uri uri of the topic (obtained by calling trainTopicCreateTopic method) to clear
|
|
68
|
+
*/
|
|
69
|
+
trainTopicClearTopic(uri: string): Promise<ER.Analytics.Response>;
|
|
70
|
+
/**
|
|
71
|
+
* Add the information extracted from the provided "text" to the topic with uri "uri".
|
|
72
|
+
* @param uri uri of the topic (obtained by calling trainTopicCreateTopic method)
|
|
73
|
+
* @param text text to analyze and extract information from
|
|
74
|
+
*/
|
|
75
|
+
trainTopicAddDocument(uri: string, text: string): Promise<ER.Analytics.Response>;
|
|
76
|
+
/**
|
|
77
|
+
* Retrieve topic for the topic for which you have already finished training
|
|
78
|
+
* @param uri uri of the topic (obtained by calling trainTopicCreateTopic method)
|
|
79
|
+
* @returns returns the trained topic: { concepts: [], categories: [] }
|
|
80
|
+
*/
|
|
81
|
+
trainTopicGetTrainedTopic(uri: string, args?: ER.Analytics.TrainTopicGetTrainedTopicArguments): Promise<ER.Analytics.Response>;
|
|
82
|
+
}
|