You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by Marshall Schor <ms...@schor.com> on 2013/12/10 21:26:39 UTC

Re: [jira] [Created] (UIMA-3374) A new mode for annotation view based on feature values

Hi James,

I've now re-read your original emails :-) and have some more thoughts about the
CasAnnotationViewer.  Apologies for longish post.

The CasAnnotationViewer is one of 3 (?) we have in the tooling for UIMA.  The
other two: One is the CVD - this is less "Annotation" oriented, and more
generally "Feature Structure" oriented (not all Feature Structures are subtypes
of Annotation).  The other is the one that comes with the Cas Editor (and is
also used by Ruta, I believe).  I haven't crawled through these, so I would
welcome others who have to comment on the differences.

-----------

The CasAnnotationViewer does a Categorization of Feature Structures (FSs) when
showing Annotations.  It assigns each annotation a category, which in turn has
name and a color, and an "enablement" - the checkbox.  The checkbox acts like a
filter, selecting a subset of all the categories to show.

The specification of these can be also configured by reading a file (see the
tools documentation section on the Edit Style Map functions:
http://uima.apache.org/d/uimaj-2.4.2/tools.html#ugr.tools.doc_analyzer.configuring;
this can specify if category should be hidden, and if it should initially be
"checked".

The current viewer is designed to be configured by its caller via an API, as
well as by the GUI it presents.  It supports 3 (!) kinds of categorization:
  * by type,  (the default)
  * by == begin/end feature values, (the built-in default 2nd categorization)
  * and by arbitrary (user-supplied code) algorithm.

These last 2 are the "entity" display which is by default turned off (but
callers can turn it via an API).

--------

Your extension wants to do a categorization, based on equal values for a
specific feature of one specified type.

To make this work, the new categorization needs 2 parameters: the type and the
feature.  These could, in theory, be provided for by either an API and/or by a GUI.

I suspect (but I haven't actually tried it) that if you were to write a small
driving application that reads in a CAS, and then calls the CasAnnotationViewer,
configuring it to do "Entity" displays, and setting the EntityResolver to be to
categorize on equal values of a particular types for a particular feature, that
the existing implementation would already do what you want. 

Of course, you might want to have this parameterized categorization algorithm be
also configurable by a GUI at run time.  You could use a dialog in the calling
class that put up a selection window for picking the type and feature from among
the available types / features of the CAS's type system.

If the goal is to have existing tooling (which already configures and calls the
CasAnnotationViewer) have this new capability, then another kind of design might
be one which modified the existing CasAnnotationViewer by
  a) adding a GUI action to bring up a new window for picking among alternative
built-in (parameterized) Categorizers;
  b) adding your new categorizer
  c) adding a sub-dialog to allow picking a type and then a feature of that
type, for configuring your categorizer.

This would then just use the existing custom entity display mode.

This approach would also allow making the existing alternative categorizer
(which categorizes FSs together which have the same begin and end values), visible.

----------
This approach would also suggest a direction for adding additional kinds of
(parameterizable) categorizers, in the future.

WDYT?

-Marshall







On 10/24/2013 4:52 PM, James Zhu (JIRA) wrote:
> James Zhu created UIMA-3374:
> -------------------------------
>
>              Summary: A new mode for annotation view based on feature values
>                  Key: UIMA-3374
>                  URL: https://issues.apache.org/jira/browse/UIMA-3374
>              Project: UIMA
>           Issue Type: Improvement
>           Components: InternalTools
>     Affects Versions: 2.5.0SDK
>             Reporter: James Zhu
>             Priority: Minor
>
>
> I'd like to propose adding a new "view mode" in the UIMA Annotation Viewer so that user can pick a specific type of annotations, and then pick a specific feature, and pick specific feature values available so user can see a subset of those annotation objects that have the specific feature values.
>
>
>
> --
> This message was sent by Atlassian JIRA
> (v6.1#6144)
>


Re: [jira] [Created] (UIMA-3374) A new mode for annotation view based on feature values

Posted by Marshall Schor <ms...@schor.com>.
As an aside, thanks for doing the basic restructuring work you've done on these
classes; I think we should keep that so that future maintenance is a bit easier.

-Marshall

On 12/10/2013 3:26 PM, Marshall Schor wrote:
> Hi James,
>
> I've now re-read your original emails :-) and have some more thoughts about the
> CasAnnotationViewer.  Apologies for longish post.
>
> The CasAnnotationViewer is one of 3 (?) we have in the tooling for UIMA.  The
> other two: One is the CVD - this is less "Annotation" oriented, and more
> generally "Feature Structure" oriented (not all Feature Structures are subtypes
> of Annotation).  The other is the one that comes with the Cas Editor (and is
> also used by Ruta, I believe).  I haven't crawled through these, so I would
> welcome others who have to comment on the differences.
>
> -----------
>
> The CasAnnotationViewer does a Categorization of Feature Structures (FSs) when
> showing Annotations.  It assigns each annotation a category, which in turn has
> name and a color, and an "enablement" - the checkbox.  The checkbox acts like a
> filter, selecting a subset of all the categories to show.
>
> The specification of these can be also configured by reading a file (see the
> tools documentation section on the Edit Style Map functions:
> http://uima.apache.org/d/uimaj-2.4.2/tools.html#ugr.tools.doc_analyzer.configuring;
> this can specify if category should be hidden, and if it should initially be
> "checked".
>
> The current viewer is designed to be configured by its caller via an API, as
> well as by the GUI it presents.  It supports 3 (!) kinds of categorization:
>   * by type,  (the default)
>   * by == begin/end feature values, (the built-in default 2nd categorization)
>   * and by arbitrary (user-supplied code) algorithm.
>
> These last 2 are the "entity" display which is by default turned off (but
> callers can turn it via an API).
>
> --------
>
> Your extension wants to do a categorization, based on equal values for a
> specific feature of one specified type.
>
> To make this work, the new categorization needs 2 parameters: the type and the
> feature.  These could, in theory, be provided for by either an API and/or by a GUI.
>
> I suspect (but I haven't actually tried it) that if you were to write a small
> driving application that reads in a CAS, and then calls the CasAnnotationViewer,
> configuring it to do "Entity" displays, and setting the EntityResolver to be to
> categorize on equal values of a particular types for a particular feature, that
> the existing implementation would already do what you want. 
>
> Of course, you might want to have this parameterized categorization algorithm be
> also configurable by a GUI at run time.  You could use a dialog in the calling
> class that put up a selection window for picking the type and feature from among
> the available types / features of the CAS's type system.
>
> If the goal is to have existing tooling (which already configures and calls the
> CasAnnotationViewer) have this new capability, then another kind of design might
> be one which modified the existing CasAnnotationViewer by
>   a) adding a GUI action to bring up a new window for picking among alternative
> built-in (parameterized) Categorizers;
>   b) adding your new categorizer
>   c) adding a sub-dialog to allow picking a type and then a feature of that
> type, for configuring your categorizer.
>
> This would then just use the existing custom entity display mode.
>
> This approach would also allow making the existing alternative categorizer
> (which categorizes FSs together which have the same begin and end values), visible.
>
> ----------
> This approach would also suggest a direction for adding additional kinds of
> (parameterizable) categorizers, in the future.
>
> WDYT?
>
> -Marshall
>
>
>
>
>
>
>
> On 10/24/2013 4:52 PM, James Zhu (JIRA) wrote:
>> James Zhu created UIMA-3374:
>> -------------------------------
>>
>>              Summary: A new mode for annotation view based on feature values
>>                  Key: UIMA-3374
>>                  URL: https://issues.apache.org/jira/browse/UIMA-3374
>>              Project: UIMA
>>           Issue Type: Improvement
>>           Components: InternalTools
>>     Affects Versions: 2.5.0SDK
>>             Reporter: James Zhu
>>             Priority: Minor
>>
>>
>> I'd like to propose adding a new "view mode" in the UIMA Annotation Viewer so that user can pick a specific type of annotations, and then pick a specific feature, and pick specific feature values available so user can see a subset of those annotation objects that have the specific feature values.
>>
>>
>>
>> --
>> This message was sent by Atlassian JIRA
>> (v6.1#6144)
>>
>