EEXCESS / c4

C4 - Cultural and sCientific Content in Context - is the EEXCESS context detection framework written in JavaScript. It provides supporting functionionality to enable easy user mining and querying for all EEXCESS clients. It supports for example Named Entity Recognition using the DOSeR Service, paragraph detection, Citation Buidling etc.
http://eexcess.eu/
1 stars 1 forks source link

[paragraph detection] provide selection augmentation #14

Closed schloett closed 8 years ago

schloett commented 8 years ago

Integrate a function, which allows to augment selections in a page with EEXCESS interactions (add keyword, set as paragraph, retrieve results for selection), like sketched in this screenshot: selection2 It must be possible to turn the augmentation on and off. For add keyword and retrieve results for selection I would propose to require custom function as parameters, which receive the corresponding values and set as paragraph might trigger an appropriate event. Hence the sketch for calling this function might look like so:

function augmentSelection(
  function(keywordToAdd) {
    // e.g. add to searchbar
  },
  function(selectedText) {
    // e.g. call paragraphToQuery and set keywords in searchBar
  }
);
schloett commented 8 years ago

additionally, keywords might be added by double-click. But this is probably functionality which needs to be implemented by the respective client, nevertheless, the search bar should provide a function to add keywords, which the client can then call. For the chrome-extension, a separate issue https://github.com/EEXCESS/chrome-extension/issues/37 has been created.

treml05 commented 8 years ago

The plan is that 3 different buttons appear on the right-side of the selection.

B1.: "Add these words as a Keyword-Tag in the SearchBar" B2.: "Search with the (automatically recognised) Named Entities in this selection" B3.: "Handle this selection as a paragraph"

treml05 commented 8 years ago

Buttons: screenshot 2015-11-05 19 40 59

treml05 commented 8 years ago

B1 & B2 are working good now. Some Design & Usability improvements are in progress now. Furthermore I'm working on a good solution for B3. (What happens, if the selection is shorter than one paragraph, or the selection is part of 2 or more paragraphs...)

schloett commented 8 years ago

We might add a 4th button, which allows the user to set the selection as main topic. This makes only sense, if the selection is short, basically a keyword in itself. Not sure, if we should provide the main topic option only if that is the case or for consistency everytime.

treml05 commented 8 years ago

Ok, I undersand. Any proposal for a button-design? There should be a "design-consistency" in terms of main topics. About your question: Perhaps it's a good solution if the button isn't grey, if the selection is too long?

I'll think about this.

schloett commented 8 years ago

The 4th button is not the focus currently, first things first ;) I just wanted to mention it here, in order not to forget. But first the other buttons need to work and there must be the possibility to switch the augmentation off again.

treml05 commented 8 years ago

augmentation can be switched on/off. first three buttons work. (in my opinion)

treml05 commented 8 years ago

Improvement, we discussed today:

-show 3rd GREEN button just in case the selection makes sense. (tooltip: description ->make paragraph) -if selection doesn't make sense: show GREY button without function (tooltip: selection doesn't make sense)

treml05 commented 8 years ago

Suggestion for Button 4:

screenshot 2015-12-15 17 46 28

schloett commented 8 years ago

looks nice. Maybe you could move the line in the middle a bit to the bottom? Such that it resembles the main topic UI element a bit more? mt

treml05 commented 8 years ago

First version with all discussed topics is online.

problems atm: button 3 is not performant don't know the best solution to add a mainTopic

schloett commented 8 years ago

Could you please provide some documentation on the code for the 4th button and wrap the parameters of activateSelectionAugmentation in an object with optional arguments as discussed last time? Also, you might need to consider the position in addition to the width. For example, in a setting like this:

---
  ---
---

each "paragraph" has the same width, but the bounding box is larger. Regarding the problems:

treml05 commented 8 years ago

you're right. Button 3 works well!

made now all improvements, you said and it still works fine.

but still cannot handle to set mainTopics..

schloett commented 8 years ago

No problem with the main topic, just pass the selection to the function as with the other options. In addition, you may assign me an issue for adding a main topic to the search bar (then you will get notified when the issue is fixed and you can integrate it in the example - code is already available, did not have the time to push it in the master branch yet). Also there is an improvement and a bugfix to add, but I will create separate issues for it