[EP-tech] Experimental integration with MS Azure Cognitive Services

David R Newman drn at ecs.soton.ac.uk
Mon Jun 29 10:52:31 BST 2020


Hi Liam,


If you want to count usage and abstract the service, you would probably 
ultimately want to end up with a ServiceCall data object.  As this would 
faciltate both these goals, it would also mean you would have a 
historical record of service calls which could help debugging issues.  
This does feel a little bit over-the-top but if you keep the data object 
as succinct as possible (e.g. servicecallid, type, timestamp, 
request_params, response, response_code) then this probably would no be 
too difficult to implement.  There may be other things that could be 
stored but as these may vary between different services.  It is probably 
best to leave this to user-defined configuration.


Regards


David Newman


On 29/06/2020 10:13, Liam Green-Hughes wrote:
> Hi David,
>
> Absolutely! This wasn't really meant to be production ready and just a 
> quick experiment. There are multiple ways to do this, you could for 
> instance do some sort of AJAX call and show the results as suggested 
> keywords, or as you say add them via the event queue. One thing I 
> would probably want to do before putting it in production would be to 
> have some way of monitoring the number of Azure API calls that had 
> been made as, like many services in the cloud, the price you pay 
> depends on how much you use it. I'd probably want to abstract the 
> service used as well so that people can use their favoured provider 
> (if they have equivalent services).
>
> Thanks
> Liam
> ------------------------------------------------------------------------
> *From:* David R Newman <drn at ecs.soton.ac.uk>
> *Sent:* 29 June 2020 10:05
> *To:* eprints-tech at ecs.soton.ac.uk <eprints-tech at ecs.soton.ac.uk>; 
> Liam Green-Hughes <L.E.Green-Hughes at kent.ac.uk>
> *Subject:* Re: [EP-tech] Experimental integration with MS Azure 
> Cognitive Services
>
> One thing I forgot to mention was that this call is probably better as 
> an event queue task rather than a before commit trigger.  As if you 
> are relying on a third-party application you don't want to be waiting 
> on this before the page can reload.  If you are only send the abstract 
> that is probably going to be fairly rapid.  However, sometimes 
> abstracts can be rather long and I can imagine the service being less 
> responsive at times. So you may wait a while before you get a response 
> back, so you can reload the page.  Obviously the disadvantage of 
> having an event queue task is that you will end up with two revisions 
> rather than one.  However, your code at the moment suggests this 
> service will only be called once, as once there are keywords it cannot 
> be run again.
>
>
> Just another thought: If you were to change this so keywords could be 
> updated, obviously you would want to check to see the fields that were 
> being sent for keywords analysis had changed and only call this 
> service if they had.  You would also need some code to parse the 
> current and returned keywords to merge them together.
>
>
> On 29/06/2020 09:54, David R Newman via Eprints-tech wrote:
>>
>> Hi Liam,
>>
>>
>> Looks interesting.  I have been working on improving search on 
>> keywords within EPrints by introducing a new Keywords MetaField type 
>> that is backwards with the Longtext MetaField that is currently the 
>> type with the keywords field.  I have also introduced a Idci (short 
>> for ID Case Insentive) field that could be used for keywords when set 
>> to be a multiple field.  Hopefully, I will be able to make the 
>> official release of 3.4.2 that includes these available this week.
>>
>>
>> Regards
>>
>>
>> David Newman
>>
>>
>> On 29/06/2020 09:44, Liam Green-Hughes via Eprints-tech wrote:
>>> Hi everyone,
>>>
>>> I've been experimenting with integrating EPrints with an off the 
>>> shelf AI solution to generate keywords. The service I used was the 
>>> Text Analytics service element of the Microsoft Azure Text 
>>> Analytics. I've only gone as far as experimenting with the Key 
>>> Phrases endpoint so far, but the Named Entities endpoint looks like 
>>> it could add real value to EPrints records too.
>>>
>>> The integration file is here: 
>>> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fliamgh%2Feprints-ai-expt%2Fblob%2Fmaster%2Fz_azure_keywords.pl&amp;data=01%7C01%7C%7C6e027769d15d46506d4008d81c122413%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=9ZkaXY1yaZ65bXZaJO%2BWS%2BrjErCHilDuMVd4Nfv%2Bj4U%3D&amp;reserved=0 
>>> <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fliamgh%2Feprints-ai-expt%2Fblob%2Fmaster%2Fz_azure_keywords.pl&amp;data=01%7C01%7C%7C6e027769d15d46506d4008d81c122413%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=9ZkaXY1yaZ65bXZaJO%2BWS%2BrjErCHilDuMVd4Nfv%2Bj4U%3D&amp;reserved=0>. 
>>> It isn't really production ready, but it is a starting point.
>>>
>>> Let me know your thoughts!
>>>
>>> Thanks
>>> Liam
>>>
>>> *** Options:http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
>>> *** Archive:https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&amp;data=01%7C01%7C%7C6e027769d15d46506d4008d81c122413%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=8C01NE73%2BoPngKx4Y9NjHboYs6wrD1HLhSFLitwdGPM%3D&amp;reserved=0  <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&amp;data=01%7C01%7C%7C6e027769d15d46506d4008d81c122413%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=8C01NE73%2BoPngKx4Y9NjHboYs6wrD1HLhSFLitwdGPM%3D&amp;reserved=0>
>>> *** EPrints community wiki:https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=01%7C01%7C%7C6e027769d15d46506d4008d81c122413%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=mhs0OQbfhm2VxX0IxEn8Hu43vnmQgkQPi%2BRhmIftafs%3D&amp;reserved=0  <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=01%7C01%7C%7C6e027769d15d46506d4008d81c122413%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=mhs0OQbfhm2VxX0IxEn8Hu43vnmQgkQPi%2BRhmIftafs%3D&amp;reserved=0>
>>
>> <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.avg.com%2Femail-signature%3Futm_medium%3Demail%26utm_source%3Dlink%26utm_campaign%3Dsig-email%26utm_content%3Demailclient&amp;data=01%7C01%7C%7C6e027769d15d46506d4008d81c122413%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=aiNzv7Np0neIuKlNMjo7CqkPvwevGK6Wqz8y8xlvduQ%3D&amp;reserved=0> 
>> 	Virus-free. https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.avg.com%2F&amp;data=01%7C01%7C%7C6e027769d15d46506d4008d81c122413%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=zWmQCY4EVIiA5yLH%2BTj4enaQ%2BAb%2BuDDvytgSA9N6xJI%3D&amp;reserved=0 
>> <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.avg.com%2Femail-signature%3Futm_medium%3Demail%26utm_source%3Dlink%26utm_campaign%3Dsig-email%26utm_content%3Demailclient&amp;data=01%7C01%7C%7C6e027769d15d46506d4008d81c122413%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=aiNzv7Np0neIuKlNMjo7CqkPvwevGK6Wqz8y8xlvduQ%3D&amp;reserved=0> 
>>
>>
>>
>> *** Options:http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
>> *** Archive:https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&amp;data=01%7C01%7C%7C6e027769d15d46506d4008d81c122413%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=8C01NE73%2BoPngKx4Y9NjHboYs6wrD1HLhSFLitwdGPM%3D&amp;reserved=0  <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&amp;data=01%7C01%7C%7C6e027769d15d46506d4008d81c122413%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=8C01NE73%2BoPngKx4Y9NjHboYs6wrD1HLhSFLitwdGPM%3D&amp;reserved=0>
>> *** EPrints community wiki:https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=01%7C01%7C%7C6e027769d15d46506d4008d81c122413%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=mhs0OQbfhm2VxX0IxEn8Hu43vnmQgkQPi%2BRhmIftafs%3D&amp;reserved=0  <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=01%7C01%7C%7C6e027769d15d46506d4008d81c122413%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=mhs0OQbfhm2VxX0IxEn8Hu43vnmQgkQPi%2BRhmIftafs%3D&amp;reserved=0>


-- 
This email has been checked for viruses by AVG.
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.avg.com%2F&amp;data=01%7C01%7C%7C6e027769d15d46506d4008d81c122413%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=35MMOR0dpQfT%2ByU7IFELc6iKVH98ZTKvlH0U3VRpMvs%3D&amp;reserved=0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20200629/bb4cc2c7/attachment-0001.html 


More information about the Eprints-tech mailing list