Re: Cas Editor: selecting annotation type

2011-05-06 Thread Jens Grivolla

On 05/05/2011 09:30 PM, Jörn Kottmann wrote:

On 5/5/11 6:09 PM, Jens Grivolla wrote:

On 05/05/2011 03:04 PM, Jörn Kottmann wrote:

On 5/5/11 2:41 PM, Jens Grivolla wrote:

At least on my system (Eclipse Helios on Ubuntu 10.10) the Shift+Enter
shortcut does not work, and will be treated as an unmodified Enter,
i.e. no selection list appears. I haven't tried yet on other systems
because I need to install the updated plugins first.


Ok, I will investigate that. But then this was not the system where you
experienced the hang issue in the 2.3.1 version?


As you said, the freeze was due to the shortcut creation when the type
system is too big, and it ocurred on all machines.

I sometimes have to press return twice to get a quick annotation,
too, and on a different machine (Eclipse Helios on Windows XP) it
worked even less, to the point that I had to use the context menu.


I opened a jira for the short cut issue and fixed it, would be nice if
you could
test. I believe the issue is related to a recently defined command and
key binding in the
plugin.xml. I also now did this for the quick type selection dialog
short cut.

Here is the jira:
https://issues.apache.org/jira/browse/UIMA-2139


Shift+Enter now seems to work reliably. Plain Enter works when I select 
a word via double click, but has problems when I select a text span (on 
my Linux machine). Shift+Enter works in that case, and plain Enter works 
after pressing Shift+Enter or just pressing any other key, eg. Shift or 
Ctrl.



On that machine the edit view was having problems, too, and I
usually had to click on the feature name before being able to activate
the feature value field. I haven't tried Shift+Enter on that machine.


Did you run the current trunk on that machine? If so would be nice if
you can give me further details
about the edit view issues. What type had the feature you clicked on?
Are there exceptions in the error log?


Yes, that was running trunk with yesterday morning's fixes. 
Unfortunately, I don't have access to that machine anymore and can't 
give you any more details at this point.  We do have some other Windows 
machines though, and I will look if I find anything in the error logs 
both on Linux and Windows.



[..] Which brings me to another thing that
would be interesting for us: having preset feature values filled in
automatically. We would be using that to automatically fill in the
annotator's name on all annotations created by them.


This you can easily do when you pre-process the files you pass to the
annoator, or post-process when he gives them back.


I've been thinking about that option. It would be quite easy at the
document level, but becomes a bit more complicated when each
annotation can come from a different annotator and files get passed
from one annotator to the next.


For one project I created a small plugin which just defined a view for
something similar.
Its actual not difficult to access the CAS and updates to it through the
Annotation Editor.


We're currently thinking of just post-processing the XMIs and adding the 
annotator name to all annotations (of the types of interest) that don't 
have a name set yet.  We'll look into doing something more sophisticated 
for the next round of annotations.


Thanks a lot for your help,
Jens



Re: Cas Editor: selecting annotation type

2011-05-05 Thread Jens Grivolla

On 05/04/2011 02:44 PM, Jörn Kottmann wrote:

On 5/4/11 2:33 PM, Jens Grivolla wrote:

How do I best update to the
trunk version?


You can either build the trunk version yourself or pick up a
distribution from our build server.


I've got a local build based on trunk.


I am not sure what is the best way to update, or what will happen if an
old and newer version is installed
into the same eclipse installation.
I would try to put the new eclipse plugins into the dropins folder, and
then see if they get loaded instead,
if not I suggest that you remove the plugins installed via Install new
software


It seems to have picked it up ok, but I'm getting errors when opening an 
XMI with the Annotation editor:


Caused by: org.eclipse.core.internal.resources.ResourceException: 
Resource '/OneOfMyClosedProjects' is not open.
	at 
org.eclipse.core.internal.resources.Project.checkAccessible(Project.java:137)

at 
org.eclipse.core.internal.resources.Project.hasNature(Project.java:511)
at 
org.apache.uima.caseditor.CasEditorPlugin.start(CasEditorPlugin.java:90)

Apparently the migration from CasEditorProjects to the new way fails 
whenever there is a closed project in the workspace.  I don't have any 
projects that need to be migrated, but it tries to check every project I 
have and fails hard when it can't.  It would be good if somebody could 
verify that before filing a bug report.


Bye,
Jens



Re: Cas Editor: selecting annotation type

2011-05-05 Thread Jörn Kottmann

On 5/5/11 12:37 PM, Jens Grivolla wrote:
It seems to have picked it up ok, but I'm getting errors when opening 
an XMI with the Annotation editor:


Caused by: org.eclipse.core.internal.resources.ResourceException: 
Resource '/OneOfMyClosedProjects' is not open.
at 
org.eclipse.core.internal.resources.Project.checkAccessible(Project.java:137)
at 
org.eclipse.core.internal.resources.Project.hasNature(Project.java:511)
at 
org.apache.uima.caseditor.CasEditorPlugin.start(CasEditorPlugin.java:90)


Apparently the migration from CasEditorProjects to the new way fails 
whenever there is a closed project in the workspace.  I don't have any 
projects that need to be migrated, but it tries to check every project 
I have and fails hard when it can't.  It would be good if somebody 
could verify that before filing a bug report.


Thanks for reporting this, the call to hasNature fails if the project is 
closed.

I will open the jira issue myself and then commit my fix.

Jörn


Re: Cas Editor: selecting annotation type

2011-05-05 Thread Jens Grivolla

On 05/05/2011 12:37 PM, Jens Grivolla wrote:

I'm getting errors when opening an
XMI with the Annotation editor:

Caused by: org.eclipse.core.internal.resources.ResourceException:
Resource '/OneOfMyClosedProjects' is not open.
at
org.eclipse.core.internal.resources.Project.checkAccessible(Project.java:137)

at org.eclipse.core.internal.resources.Project.hasNature(Project.java:511)
at org.apache.uima.caseditor.CasEditorPlugin.start(CasEditorPlugin.java:90)

Apparently the migration from CasEditorProjects to the new way fails
whenever there is a closed project in the workspace. I don't have any
projects that need to be migrated, but it tries to check every project I
have and fails hard when it can't. It would be good if somebody could
verify that before filing a bug report.


It works fine after I removed the check.

- if ( project.hasNature(org.apache.uima.caseditor.NLPProject)) {
+ if (false) {

Bye,
Jens



Re: Cas Editor: selecting annotation type

2011-05-05 Thread Jörn Kottmann

On 5/5/11 12:55 PM, Jens Grivolla wrote:

On 05/05/2011 12:37 PM, Jens Grivolla wrote:

I'm getting errors when opening an
XMI with the Annotation editor:

Caused by: org.eclipse.core.internal.resources.ResourceException:
Resource '/OneOfMyClosedProjects' is not open.
at
org.eclipse.core.internal.resources.Project.checkAccessible(Project.java:137) 



at 
org.eclipse.core.internal.resources.Project.hasNature(Project.java:511)
at 
org.apache.uima.caseditor.CasEditorPlugin.start(CasEditorPlugin.java:90)


Apparently the migration from CasEditorProjects to the new way fails
whenever there is a closed project in the workspace. I don't have any
projects that need to be migrated, but it tries to check every project I
have and fails hard when it can't. It would be good if somebody could
verify that before filing a bug report.


It works fine after I removed the check.

- if ( project.hasNature(org.apache.uima.caseditor.NLPProject)) {
+ if (false) {


Yes, but that would disable to migration code.

The fix is now:
if (project.isOpen()  
project.hasNature(org.apache.uima.caseditor.NLPProject))


Jörn


Re: Cas Editor: selecting annotation type

2011-05-05 Thread Jens Grivolla

On 05/05/2011 12:59 PM, Jörn Kottmann wrote:

On 5/5/11 12:55 PM, Jens Grivolla wrote:

On 05/05/2011 12:37 PM, Jens Grivolla wrote:

I'm getting errors when opening an
XMI with the Annotation editor:

Caused by: org.eclipse.core.internal.resources.ResourceException:
Resource '/OneOfMyClosedProjects' is not open.
at
org.eclipse.core.internal.resources.Project.checkAccessible(Project.java:137)


at
org.eclipse.core.internal.resources.Project.hasNature(Project.java:511)
at
org.apache.uima.caseditor.CasEditorPlugin.start(CasEditorPlugin.java:90)

Apparently the migration from CasEditorProjects to the new way fails
whenever there is a closed project in the workspace. I don't have any
projects that need to be migrated, but it tries to check every project I
have and fails hard when it can't. It would be good if somebody could
verify that before filing a bug report.


It works fine after I removed the check.

- if ( project.hasNature(org.apache.uima.caseditor.NLPProject)) {
+ if (false) {


Yes, but that would disable to migration code.

The fix is now:
if (project.isOpen() 
project.hasNature(org.apache.uima.caseditor.NLPProject))


Of course, it was just to get it working as soon as possible.  I 
recompiled with your fix and reinstalled the plugins, and I see no problems.


Thanks,
Jens



Re: Cas Editor: selecting annotation type

2011-05-05 Thread Jörn Kottmann

On 5/5/11 2:41 PM, Jens Grivolla wrote:

On 05/05/2011 01:55 PM, Jörn Kottmann wrote:

On 5/5/11 1:44 PM, Jörn Kottmann wrote:

That sounds like one more good reason to do that. Another one I thought
of is that it is confusing when you add an annotation which you cannot
see afterward.

So lets open a jira and do this enhancement.


Here is the jira:
https://issues.apache.org/jira/browse/UIMA-2137

Do you think this dialog fixes the problem you reported initially with
the editor annotation mode?


Yes, I think that would work quite well for us.  One issue with 
setting the shortcuts based on the full type system is that in our 
case at hand some of the annotation types we need don't get assigned a 
shortcut.



Nice, I will try to fix this quickly for you.

At least on my system (Eclipse Helios on Ubuntu 10.10) the Shift+Enter 
shortcut does not work, and will be treated as an unmodified Enter, 
i.e. no selection list appears.  I haven't tried yet on other systems 
because I need to install the updated plugins first.


Ok, I will investigate that. But then this was not the system where you 
experienced the hang issue in the 2.3.1 version?


I still think it would be nice to be able to change the mode from the 
Outline view, but that feature would definitely have much lower 
priority then.




Yes, I also believe that could be a good place to have it, please open a 
jira issue for it.



Do you also need to fill in feature values for each created annotation?


Yes, for many of them we do.  Which brings me to another thing that 
would be interesting for us: having preset feature values filled in 
automatically.  We would be using that to automatically fill in the 
annotator's name on all annotations created by them.


This you can easily do when you pre-process the files you pass to the 
annoator, or post-process when he gives them back.


I believe we should start working here on tooling support for annotation 
projects. There you typically have a collection of

documents which must be annotated by a team of annotators.

Jörn



Re: Cas Editor: selecting annotation type

2011-05-05 Thread Jens Grivolla

On 05/05/2011 03:04 PM, Jörn Kottmann wrote:

On 5/5/11 2:41 PM, Jens Grivolla wrote:

On 05/05/2011 01:55 PM, Jörn Kottmann wrote:

On 5/5/11 1:44 PM, Jörn Kottmann wrote:

That sounds like one more good reason to do that. Another one I thought
of is that it is confusing when you add an annotation which you cannot
see afterward.

So lets open a jira and do this enhancement.


Here is the jira:
https://issues.apache.org/jira/browse/UIMA-2137

Do you think this dialog fixes the problem you reported initially with
the editor annotation mode?


Yes, I think that would work quite well for us. One issue with setting
the shortcuts based on the full type system is that in our case at
hand some of the annotation types we need don't get assigned a shortcut.


Nice, I will try to fix this quickly for you.


Thanks, that's great.  I think that could be a significant time saver.


At least on my system (Eclipse Helios on Ubuntu 10.10) the Shift+Enter
shortcut does not work, and will be treated as an unmodified Enter,
i.e. no selection list appears. I haven't tried yet on other systems
because I need to install the updated plugins first.


Ok, I will investigate that. But then this was not the system where you
experienced the hang issue in the 2.3.1 version?


As you said, the freeze was due to the shortcut creation when the type 
system is too big, and it ocurred on all machines.


I sometimes have to press return twice to get a quick annotation, too, 
and on a different machine (Eclipse Helios on Windows XP) it worked even 
less, to the point that I had to use the context menu.  On that machine 
the edit view was having problems, too, and I usually had to click on 
the feature name before being able to activate the feature value field. 
 I haven't tried Shift+Enter on that machine.



I still think it would be nice to be able to change the mode from the
Outline view, but that feature would definitely have much lower
priority then.



Yes, I also believe that could be a good place to have it, please open a
jira issue for it.


done: https://issues.apache.org/jira/browse/UIMA-2138


Do you also need to fill in feature values for each created annotation?


Yes, for many of them we do. Which brings me to another thing that
would be interesting for us: having preset feature values filled in
automatically. We would be using that to automatically fill in the
annotator's name on all annotations created by them.


This you can easily do when you pre-process the files you pass to the
annoator, or post-process when he gives them back.


I've been thinking about that option.  It would be quite easy at the 
document level, but becomes a bit more complicated when each annotation 
can come from a different annotator and files get passed from one 
annotator to the next.



I believe we should start working here on tooling support for annotation
projects. There you typically have a collection of
documents which must be annotated by a team of annotators.


Yes, I think our situation is probably quite typical really.

Thanks,
Jens



Re: Cas Editor: selecting annotation type

2011-05-05 Thread Jörn Kottmann

On 5/5/11 6:09 PM, Jens Grivolla wrote:

On 05/05/2011 03:04 PM, Jörn Kottmann wrote:

On 5/5/11 2:41 PM, Jens Grivolla wrote:

On 05/05/2011 01:55 PM, Jörn Kottmann wrote:

On 5/5/11 1:44 PM, Jörn Kottmann wrote:
That sounds like one more good reason to do that. Another one I 
thought
of is that it is confusing when you add an annotation which you 
cannot

see afterward.

So lets open a jira and do this enhancement.


Here is the jira:
https://issues.apache.org/jira/browse/UIMA-2137



This jira is now fixed.


At least on my system (Eclipse Helios on Ubuntu 10.10) the Shift+Enter
shortcut does not work, and will be treated as an unmodified Enter,
i.e. no selection list appears. I haven't tried yet on other systems
because I need to install the updated plugins first.


Ok, I will investigate that. But then this was not the system where you
experienced the hang issue in the 2.3.1 version?


As you said, the freeze was due to the shortcut creation when the type 
system is too big, and it ocurred on all machines.


I sometimes have to press return twice to get a quick annotation, 
too, and on a different machine (Eclipse Helios on Windows XP) it 
worked even less, to the point that I had to use the context menu.


I opened a jira for the short cut issue and fixed it, would be nice if 
you could
test. I believe the issue is related to a recently defined command and 
key binding in the
plugin.xml. I also now did this for the quick type selection dialog 
short cut.


Here is the jira:
https://issues.apache.org/jira/browse/UIMA-2139

On that machine the edit view was having problems, too, and I 
usually had to click on the feature name before being able to activate 
the feature value field.  I haven't tried Shift+Enter on that machine.


Did you run the current trunk on that machine? If so would be nice if 
you can give me further details
about the edit view issues. What type had the feature you clicked on? 
Are there exceptions in the error log?


Do you also need to fill in feature values for each created 
annotation?


Yes, for many of them we do. Which brings me to another thing that
would be interesting for us: having preset feature values filled in
automatically. We would be using that to automatically fill in the
annotator's name on all annotations created by them.


This you can easily do when you pre-process the files you pass to the
annoator, or post-process when he gives them back.


I've been thinking about that option.  It would be quite easy at the 
document level, but becomes a bit more complicated when each 
annotation can come from a different annotator and files get passed 
from one annotator to the next.


For one project I created a small plugin which just defined a view for 
something similar.
Its actual not difficult to access the CAS and updates to it through the 
Annotation Editor.


Jörn


Re: Cas Editor: selecting annotation type

2011-05-04 Thread Jörn Kottmann

On 5/4/11 11:10 AM, Jens Grivolla wrote:

Hi,

I have recently started using the Annotation Editor (as installed in 
Eclipse from http://www.apache.org/dist/uima/eclipse-update-site/, 
i.e. the official 2.3.1 version).


In order to add annotations it seems that you need to select the 
annotation type through the Mode context menu, which is quite time 
consuming (and error prone) if you have a large type system, and 
especially when the wanted type is derived through several levels of 
supertypes.  Given that you already select the types of interest 
through the Annotation Styles configuration, it would be much faster 
to e.g. select your annotation mode directly from the Outline view 
(which only contains your chosen subset).


You do not need to switch via the Mode context menu to add an annotation 
of the desired type. The Mode type is just the type
you can annotate with the fewest key strokes. You can use Shift + 
Enter to annotate a piece of text and then choose the
annotation type from a list of available types in a pop up. Each type in 
this list is combined with a key short cut. When you remember
the short cut you can do something like this Shift + Enter + p to 
create an annotation.

Where p is the letter written in front of one of your annotations.

Does that help you?

I will have a look at the outline view, maybe we can add there a button 
or context menu to switch the mode of the editor.


It seems that there are quite a few changes in the trunk, but I'm not 
sure how to best use those versions, preferably without messing up my 
Eclipse configuration (which is a bit fragile when using manually 
installed plugins).


We fixed a few bugs and removed the Cas Editor Project support. I 
suggest that you just create a normal eclipse project

and then place a type system at the default location.

Jörn


Re: Cas Editor: selecting annotation type

2011-05-04 Thread Jens Grivolla

On 05/04/2011 11:21 AM, Jörn Kottmann wrote:

On 5/4/11 11:10 AM, Jens Grivolla wrote:



In order to add annotations it seems that you need to select the
annotation type through the Mode context menu, which is quite time
consuming (and error prone) if you have a large type system, and
especially when the wanted type is derived through several levels of
supertypes.


You do not need to switch via the Mode context menu to add an annotation
of the desired type. The Mode type is just the type
you can annotate with the fewest key strokes. You can use Shift +
Enter to annotate a piece of text and then choose the
annotation type from a list of available types in a pop up. Each type in
this list is combined with a key short cut. When you remember
the short cut you can do something like this Shift + Enter + p to
create an annotation.
Where p is the letter written in front of one of your annotations.

Does that help you?


Unfortunately this consistently freezes Eclipse every time I have tried 
it, so I haven't even been able to see what it is supposed to do.  The 
keyboard shortcuts might help, if it worked.  We've tried it on several 
versions of Eclipse (all on Linux), and all freeze completely when 
pressing Shift-Return or clicking on the corresponding menu item.



I will have a look at the outline view, maybe we can add there a button
or context menu to switch the mode of the editor.


It seems that there are quite a few changes in the trunk, but I'm not
sure how to best use those versions, preferably without messing up my
Eclipse configuration (which is a bit fragile when using manually
installed plugins).


We fixed a few bugs and removed the Cas Editor Project support. I
suggest that you just create a normal eclipse project
and then place a type system at the default location.


That's what I'm doing, but with the 2.3.1 release installed via Install 
new software... in Eclipse.  How do I best update to the trunk version?


Thanks,
Jens