eventregistry 8.11.1 → 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.
Files changed (65) hide show
  1. package/dist/analytics.d.ts +82 -82
  2. package/dist/analytics.js +336 -330
  3. package/dist/analytics.js.map +1 -1
  4. package/dist/base.d.ts +82 -81
  5. package/dist/base.js +261 -219
  6. package/dist/base.js.map +1 -1
  7. package/dist/counts.d.ts +81 -81
  8. package/dist/counts.js +162 -149
  9. package/dist/counts.js.map +1 -1
  10. package/dist/dailyShares.d.ts +10 -10
  11. package/dist/dailyShares.js +90 -77
  12. package/dist/dailyShares.js.map +1 -1
  13. package/dist/data.d.ts +269 -268
  14. package/dist/data.js +3 -3
  15. package/dist/eventForText.d.ts +48 -48
  16. package/dist/eventForText.js +126 -123
  17. package/dist/eventForText.js.map +1 -1
  18. package/dist/eventRegistry.d.ts +244 -224
  19. package/dist/eventRegistry.js +1098 -1018
  20. package/dist/eventRegistry.js.map +1 -1
  21. package/dist/index.d.ts +21 -20
  22. package/dist/index.js +128 -122
  23. package/dist/index.js.map +1 -1
  24. package/dist/info.d.ts +61 -61
  25. package/dist/info.js +171 -158
  26. package/dist/info.js.map +1 -1
  27. package/dist/logger.d.ts +44 -0
  28. package/dist/logger.js +144 -0
  29. package/dist/logger.js.map +1 -0
  30. package/dist/query.d.ts +53 -53
  31. package/dist/query.js +333 -290
  32. package/dist/query.js.map +1 -1
  33. package/dist/queryArticle.d.ts +61 -61
  34. package/dist/queryArticle.js +183 -168
  35. package/dist/queryArticle.js.map +1 -1
  36. package/dist/queryArticles.d.ts +144 -160
  37. package/dist/queryArticles.js +729 -701
  38. package/dist/queryArticles.js.map +1 -1
  39. package/dist/queryEvent.d.ts +140 -140
  40. package/dist/queryEvent.js +587 -569
  41. package/dist/queryEvent.js.map +1 -1
  42. package/dist/queryEvents.d.ts +210 -210
  43. package/dist/queryEvents.js +825 -798
  44. package/dist/queryEvents.js.map +1 -1
  45. package/dist/queryMentions.d.ts +96 -96
  46. package/dist/queryMentions.js +637 -600
  47. package/dist/queryMentions.js.map +1 -1
  48. package/dist/queryStory.d.ts +58 -58
  49. package/dist/queryStory.js +194 -174
  50. package/dist/queryStory.js.map +1 -1
  51. package/dist/recent.d.ts +23 -23
  52. package/dist/recent.js +199 -179
  53. package/dist/recent.js.map +1 -1
  54. package/dist/returnInfo.d.ts +68 -66
  55. package/dist/returnInfo.js +332 -304
  56. package/dist/returnInfo.js.map +1 -1
  57. package/dist/topicPage.d.ts +157 -157
  58. package/dist/topicPage.js +599 -604
  59. package/dist/topicPage.js.map +1 -1
  60. package/dist/trends.d.ts +35 -35
  61. package/dist/trends.js +115 -102
  62. package/dist/trends.js.map +1 -1
  63. package/dist/types.d.ts +2453 -2155
  64. package/dist/types.js +2 -2
  65. package/package.json +13 -13
@@ -1,82 +1,82 @@
1
- import { EventRegistry } from "./eventRegistry";
2
- import { EventRegistryStatic } 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<any>;
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<any>;
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<any>;
31
- semanticSimilarity(text1: string, text2: string, distanceMeasure?: "cosine" | "jaccard"): Promise<any>;
32
- /**
33
- * Determine the language of the given text
34
- * @param text input text to analyse
35
- */
36
- detectLanguage(text: string): Promise<any>;
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<any>;
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<any>;
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?: EventRegistryStatic.Analytics.TrainTopicOnTweetsArguments): Promise<any>;
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<any>;
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<any>;
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<any>;
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?: EventRegistryStatic.Analytics.TrainTopicGetTrainedTopicArguments): Promise<any>;
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
+ }