navigating-stories / orange-story-navigator

Add-on to the Orange3 data mining toolkit with text processing widgets from the project Navigating Stories
https://research-software-directory.org/projects/navigating-stories
Other
2 stars 2 forks source link

make useful defaults for links? #42

Closed f-hafner closed 5 months ago

f-hafner commented 6 months ago

When creating an Actors widget:

It would be nice if to have the right defaults also for the second and third case.

case 1: image

case 2: image

case 3: image

kodymoodley commented 6 months ago

This can be solved definitely. It seems possible to disable inputs / outputs based on incompatibility of types or some condition. See the screenshot below. But I don't know where exactly in the source code to find this functionality. Needs some investigation. [

disable_inputs_outputs_orange

](url)

kodymoodley commented 6 months ago

Code could be in Orange itself (not necessarily only in Network add-on). Could also be in other Orange add-ons / widgets.

f-hafner commented 6 months ago

I have looked around and tried some things, but have not worked it out.

f-hafner commented 6 months ago

it seems the behavior in the screenshot above for the network explorer widget stems from Orange's built-in type checking: Orange only lets the user connect input and outputs of the same type.

It turns out that Corpus -- the type input of the Stories input for the Actor Analysis and Action Analysis widgets -- is a subclass of Table: https://github.com/biolab/orange3-text/blob/f73d42fef394f91f5810373ec38a13e1d015e41b/orangecontrib/text/corpus.py#L47

Thus, the Table output from the tagger is consistent with the Corpus type for the Stories input.

We discussed two options to solve the problem