Is your feature request related to a problem? Please describe.
In some scenarios, it might be helpful to rename a View. As an example, consider the evaluation scenario where we normally go through the following steps.
- Load a CAS with label information / annotations into the
_InitialView.
- Rename the
_InitialView to goldView.
- Make predictions with a model/pipeline and store the predictions in the
_initialView.
- Compare results from
_InitialView to goldView
One may ask why we want to have the predictions in the _InitialView and not in a new view. The reason is mainly because the Eclipse UIMA Annotation Plugin opens the _InitialView as default and otherwise one would always manually need to switch the view to see the predictions. This behavior is in line with cassis, where also the _InitialView is opened initially.
Describe the solution you'd like
I would like to have a function cas.rename_view(view_name: str) that
- renames the currently active View, which is specified in
cas._current_view, to view_name
- switches the
cas._current_view to view_name
- returns the new
View
Describe alternatives you've considered
An alternative would be an annotation copier that allows copying a set of annotations from one view to another. But for this specific use-case, this is certainly slower and more effort.
Additional context
If you agree on the parameter/scope of the function, then I can implement it.
Is your feature request related to a problem? Please describe.
In some scenarios, it might be helpful to rename a View. As an example, consider the evaluation scenario where we normally go through the following steps.
_InitialView._InitialViewtogoldView._initialView._InitialViewtogoldViewOne may ask why we want to have the predictions in the
_InitialViewand not in a new view. The reason is mainly because the Eclipse UIMA Annotation Plugin opens the_InitialViewas default and otherwise one would always manually need to switch the view to see the predictions. This behavior is in line with cassis, where also the_InitialViewis opened initially.Describe the solution you'd like
I would like to have a function
cas.rename_view(view_name: str)thatcas._current_view, toview_namecas._current_viewtoview_nameViewDescribe alternatives you've considered
An alternative would be an annotation copier that allows copying a set of annotations from one view to another. But for this specific use-case, this is certainly slower and more effort.
Additional context
If you agree on the parameter/scope of the function, then I can implement it.