instance of EventRegistry class
number of events to return for the given text
Add a value to an array of values for a property.
Remove the value of a property key (if existing).
Compute the list of most similar events for the given text
text for which to find the most similar event
language in which the text is written
Return the parameters.
Do we have in the query property named 'key'?
Set a property value that represents date. Value can be string in YYYY-MM-DD format or a Date object.
Parse the value "value" and use it to set the property propName and the operator with name propOperName
String, QueryItems or an array.
Values to be set using property name propName.
Property to set containing the "and" or "or". Relevant only if multiple items are provided in "value". Can be None if only one value is possible.
Which operator should be used in case "value" is an array. If an array, we will print also a warning to suggest use of QueryItems.
Set a value of a property in the query.
Set value in query params if the 'val' is different from 'defVal'.
StaticencodeEncode datetime into UTC ISO format which can be sent to ER.
Optionalformat: string
The GetEventForText class can be used to find the event(s) that best matches the given input text. The request is performed asynchronously.
Note: The functionality can only be used to find the events in the last 5 days. Older events cannot be matched in this way
Return info from the compute() method is in the form:
[ { "cosSim": 0.07660648086468567, "eventUri": "4969", "storyUri": "eng-af6ce79f-cb91-4010-8ddf-7ad924bc5638-40591" }, { "cosSim": 0.05851939237670918, "eventUri": "5157", "storyUri": "eng-af6ce79f-cb91-4010-8ddf-7ad924bc5638-56286" }, ... ]
Where
You can use QueryEvent or QueryStory to obtain more information about these events/stories