Mirador words highlighting - ocr

I am showing OCR-ed book pages in Mirador viewer. All words with coordinates are fetched from elasticsearch and search is across all books (meaning I can't use IIIF search api).
I need to highlight certain words in Mirador viewer.
I know that this is possible using annotations, but I need to use those annotations for something else (user comments), so I need another way for highlighting. Highlights should be displayed immediately, while annotations can be toggled.
Is there any solution with Mirador and IIIF presentation protocol or highlighting could be done on image server layer (currently I'm using IIPImage which doesn't support highlighting)?
Is there any other image server that supports highlighting and is it a good idea to do it this way?
Thanks!

Related

How to highlight all instances of a string using Chrome's Text Fragments feature?

I recently found out about the new Chrome feature called "Text Fragments" that allows links to point directly to a certain text inside an URL and have it highlighted. For example:
https://www.nytimes.com/#:~:text=Magazine
But if I point to a work that appears multiple times, only the first instance gets highlighted.
Is there any way that I can ask it to highlight all occurrences of a given string?
From what I can tell, the spec only allows for highlighting the first instance found on a page. You can specify multiple strings, but they'll all always match to the first occurrence (as of Chrome 83).
The best I can think of is expanding the matching region such that each occurrence is a unique substring. For instance, on this page one could use something like:
#:~:text=highlight%20all&text=highlighted&text=it%20to%20highlight&text=for%20highlighting
And generate these URLs via javascript.
I found a website where a syntax like [URL]?s[]=MySearchTerm&s[]=MyOtherSearchTerm works:
https://www.ipwiki.de/arbeitnehmererfinderrecht:beschraenkte_inanspruchnahme?s[]=inanspruchnahme&s[]=Arbeitgeber&s[]=Diensterfindung
However, this syntax doesn't seem to work anywhere else, so it's probably not a feature of Chrome but a function of that website.

How to embed a translator on a site

I am a foreign language teacher whos class does not have dictionaries. But we have a smartboard. I have all my tools and tasks for the students on a custom site similar to classroomscreen.com.
What I am missing is a way to embed translator.google.com or a similar translation website into my site, so students can write onto the smartboard for everyone else to see the translation.
What would be the right approach?
I tried the tag and adding deepl.com, but to make the input bar visible I need to make the way to large. All the unnecessary adds and banners show.
It would be optimal if there only was an input prompt and a list of results of the translation. Some JS accessing an API ...
But I am clueless about what to use in which way.

how to add coustomized side frame to doxygen html

I am using doxygen to generate an API document for my project written in pure C. I want to have a left side frame in the index.html generated by doxygen. So I enabled the option "GENERATE_TREEVIEW" in Doxyfile, but I am not satisfied with its layout.
I want a brief tree layout, not like this :
Files
File List
File Members
All
Functions
I have only one file to export, so I don't need "File List".
I have only functions to export(no variables, class etc.), so I don't need "File members".
And, the most reason I want to customize is that I want to classify my API into several different sub-class. Just like this:
Cursor Operation
vi_h()
vi_j()
vi_k()
vi_l()
Text Edit
vi_dw()
vi_dd()
Text Search
vi_f()
vi_F()
But doxygen seems doesn't provide a way to customize the side frame.
I have thought about another way: give up side frame, and use an category page, which can be accomplished using \section and #ref. But this is not good for readers, because every time they click, they have to switch to another web-brower tab, slow and inconvenient.

Sikuli scripts without images - Static applications

Sometimes we don't need to capture and use images for automating Desktop based application. We can simply use tab and Enter keys to achieve our task. But in some cases we need images, for example radio button, option selection, check box, etc.
Is there any way to automate these type of options without image or screen shot?
You could simply go through an order of keystrokes without needing to match any sort of pattern. Unfortunately I only make use of the Java API which may be a tad different but the idea is the same for Python (via Jython).
Screen screen = new Screen();
screen.type(Key.TAB + Key.ENTER);
If you are able to get to your radio button through a series of keystrokes, you could put them in sequential order. However using Sikuli entirely without images and patterns kind of defeats its purpose and you're better off using other alternatives such as AutoIt or if you wish to maintain it in a Python environment you could use PyAutoIt. Both are very good but the latter lacks documentation (have to read the source to understand what is going on).
It is not very clear what are you asking? Do you want to know whether you can use Sikuli just for keyboard manipulation without taking and using screenshots? If that's the case, the answer is yes. You can always run standalone commands like these:
type(Key.ENTER) #for Enter key
type("\t") #for tab

How to set focus on tab in tabcontrol in URL

I am trying to call a page in my customers webapplication (Exact Synergy Enterprise)
This is the link: http://someserveridontdisclose/Synergy/docs/CSCANEduCourseCard.aspx?ProjectNr=ACPGINTV
Within this page is an Ajax TabContainer with several TabPanels. One of them is called 'Doelgroepen'
I dont have the source for this application, as i am not the developer of it. We only develop custom extentions to it.
Here's the question: Is it possible to focus on one of the tabs USING ONLY AN URL? If so How?
Thank you very much for your thoughts about this.
try to set with javascript. you'll have to write your own js to get index number you want from url, then set like this
$find('<%=TabContainer1.ClientID%>').set_activeTabIndex(2);
http://forums.asp.net/t/1127834.aspx
http://www.aspforums.net/Threads/420684/ASPNet-AJAX-TabContainer-Set-Active-Tab-Client-side-using-JavaScript/
If you do not have access to the code and if this is not part of the requirement / design specification for the application you are using (ie: what you asked the developer to do), then the answer is No.
The control does not have "native" support for URL tab selection. There needs to be specific code in the application in order to handle this.
It is however very easy to implement, if you absolutely need it, it shouldn't take much time (about 15-30 lines of code, depending on how many tabs/urls combination you need).
You can find a running sample of the AjaxControlToolkit Tabs control at the following link (the available functionnalities are described in there):
http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/Tabs/Tabs.aspx
If the TAB has an ID you could make it visible by adding '#tabid' to the URL.