Releases: EventRegistry/event-registry-python
Releases · EventRegistry/event-registry-python
Added keywordSearchMode parameter
v9.1 (2023-06-23)
Added
- added
keywordSearchModeparameter that can be used inQueryArticles,QueryArticlesIter,QueryEvents,QueryEventsIterandQueryEventconstructors. - added
keywordSearchModeparameter to the advanced query language - added documentation page for keywordSearchMode and the examples of usage
Updated
- types of parameters in the method calls
- updated several code example files
Support for Python 3.5+ only (use of typing module)
v9.0 (2023-05-15)
Added
- added use of the
typingmodule. All parameters in the method calls use typing support to make it easier to understand what type is expected. - added autosuggest methods
suggestEventTypes,suggestIndustries,getSdgUris,getSasbUris- all to be used only when querying mentions
Updated
QueryArticlesclass. Added filtersauthorsFilter,videosFilter,linksFilterQueryMentionsclass. Added several filters:industryUri,sdgUri,sasbUri,esgUri,minSentenceIndex,maxSentenceIndex,showDuplicates- updated several code example files
Added QueryMentions
v8.10 (2021-08-16)
NOTE: This is the last version with Python 2.X and Python <3.5 support. Next version will contain type hints and will only be compatible with Python 3.5 or higher.
Added
- added file
QueryMentionsthat can be used to query mentions of specific event types. The class is currently in beta and not available to users unless they have permissions to use this endpoint. The classesQueryMentionsandQueryMentionsItercan be used in the same way as classes for querying articles and events, except that some query parameters are addded and some removed. Examples for the classes were also added.
Updated
- When using method
initWithComplexQuerywe now check if the provided json is valid json object and report error in case it is not - some bugs that appeared in edge cases when querying Event Registry using
EventRegistryclass have been fixed.
TopicPage updates, raising exceptions on some status codes
v8.9 (2020-10-21)
Added
- added
requiredandexcludedoptional parameters to the TopicPage class to methodsaddConcept,addKeyword,addCategory,addSource,addSourceLocationandaddSourceGroup. - exceptions are now raised by the SDK library in case of status codes 204, 400, 401 and 403. Previously, the requests were repeated if status code was not 200. In case of these status codes it however doesn't make sense to simply repeat the requests as the query will for sure return the same exception. The meaning of the above status codes is described on the documentation page.
Code and parameter cleanup
Added
- added
EventRegistry.getServiceStatus()method that reports status of the services ComplexQueryArticlesandComplexQueryEventsclasses now support in the constructor additional filters likeminSentiment,maxSentiment,minFacebookShares,endSourceRankPercentile, etc.
Updated
ReturnInfoclasses (ArticleInfoFlags,ConceptInfoFlags, ...) were updated. Some obsolete parameters were removed and we have added support for kwdargs to supply some very rarely used parameters directly.TopicPage.getArticlesandTopicPage.getEventsmethods now support also**kwargsso that you can now also provide other available parameters that are less frequently used.
Removed
- removed
EventRegistry.suggestCustomConcepts()andEventRegistry.getCustomConceptUri()methods. Not used anymore since we are not supporting anymore the correlation feature.
Added sentiment, updates to analytics
Added
- We added sentiment, which can now be used in querying of articles and events. The
QueryArticles,QueryArticlesIter,QueryEvents,QueryEventsIterconstructors now all have additional parametersminSentimentandmaxSentimentthat can be used to filter the articles and events. The valid values are between -1 (very negative sentiment) and 1 (very positive sentiment). Value 0 represents neutral sentiment. - Sentiment was also added as a property in the returned articles and events.
Updated
- Analytics: We updated
trainTopicOnTweets(),trainTopicClearTopic()andtrainTopicGetTrainedTopic()methods in theAnalyticsclass. Analytics.annotate()method now supports passing custom parameters that should be used when annotating the text.- Changed some defaults in the returned data. When searching articles, we now by default return article image and sentiment.
- Analytics. updated
trainTopicOnTweets(),trainTopicClearTopic()andtrainTopicGetTrainedTopic()methods in theAnalyticsclass. QueryArticles.initWithComplexQuery()was updated - the parameterdataTypewas removed (since thedataTypevalue should be provided in the$filtersection of the query)TopicPagenow supports setting also the source rank percentileAnalytics.extractArticleInfonow also supports setting the headers and cookies to be used when making the requests
Analytics - added training of topics
Added
- Added
Analytics.trainTopicOnTweets()method that can be used to train a topic by analyzing a group of tweets. See an example of usage on the wiki page. - Added a group of
Analytics.trainTopic*()methods that can be used to analyze your own documents and build a topic from them. See an example of usage on the wiki page.
Author related calls, filtering of sources by alexa ranking
Added
- added
EventRegistry.getUsageInfo()method, which returns the number of used tokens and the total number of available tokens for the given user. The existing methodsEventRegisty.getRemainingAvailableRequests()andEventRegistry.getDailyAvailableRequests()are still there, but their value is only valid after making at least one request. - added searching of articles and events based on article authors. You can now provide
authorUriparameter when creating theQueryArticlesandQueryEventsinstances. - added author related methods to
EventRegistryclass:EventRegistry.suggestAuthors()to obtain uris of authors for given (partial) name andEventRegistry.getAuthorUri()to obtain a single author uri for the given (partial) name. - added ability to search articles and events by authors.
QueryArticlesandQueryEventsconstructors now also acceptauthorUriparameter that can be used to limit the results to articles/events by those authors. UseQueryOper.AND()orQueryOper.OR()to specify multiple authors in the same query. - BETA: added a filter for returning only articles that are written by sources that have a certain ranking. The filter can be specified by setting the parameters
startSourceRankPercentileandendSourceRankPercentilewhen creating theQueryArticlesinstance. The default value forstartSourceRankPercentileis 0 and forendSourceRankPercentileis 100. The values that can be set are not any value between 0 and 100 but has to be a number divisible by 10. By settingstartSourceRankPercentileto 0 andendSourceRankPercentileto 20 you would get only articles from top ranked news sources (according to Alexa site ranking) that would amount to about approximately 20% of all matching content. Note: 20 percentiles do not represent 20% of all top sources. The value is used to identify the subset of news sources that generate approximately 20% of our collected news content. The reason for this choice is that top ranked 10% of news sources writes about 30% of all news content and our choice normalizes this effect. This feature could potentially change in the future. QueryEventArticlesIteris now able to return only a subset of articles assigned to an event. You can use the same filters as with theQueryArticlesconstructor and you can specify them when constructing the instance ofQueryEventArticlesIter. The same kind of filtering is also possible if you want to use theRequestEventArticles()class instead.- added some parameters and changed default values in some of the result types to reflect the backend changes.
- added optional parameter
proxyUrltoAnalytics.extractArticleInfo(). It can be used to download article info through a proxy that you provide (to avoid potential GDPR issues). TheproxyUrlshould be in format{schema}://{username}:{pass}@{proxy url/ip}.
Added Topic pages, added NER api endpoint, additional sentiment model
Added
- added
TopicPageclass. It can be used to create a topic by specifying keywords, concepts, sources, ... as well as their weights. You can specify a threshold and receive only articles and events that match enough specified conditions to reach the required weight. Alternatively, you can simply sort the results by relevance and get the top-ranked results that are most related to your topic page. SeeTopicPageExamples.pyfile for examples on how to use the topic pages. - added named entity extraction endpoint to
Analytics. CallAnalytics.ner(text)to extract named entities.
Updated
- sentiment analysis now supports two models - vocabulary based as well as a model using neural networks. Choose the model by specifying the
methodparameter. Possible values for it arevocabulary(vocabulary based sentiment analysis, default) orrnn(neural networks based model).
Blog data type, dataType parameter support
Added
- added
blogdata type. Various methods inEventRegistryclass accept it, such assuggestNewsSources(),suggestSourcesAtPlace()andgetNewsSourceUri().
Updated
QueryArticlesIter.initWithComplexQuery()now accepts also thedataTypeparameter (by defaultnews).
Removed
- Removed the parameter
articleBatchSizefromQueryArticlesIter.execQuerysince it was not useful. We are always returning the maximum number of results that can be obtained with a single query.