Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function to rename Views #279

Open
DavidHuebner opened this issue Feb 13, 2023 · 0 comments
Open

Function to rename Views #279

DavidHuebner opened this issue Feb 13, 2023 · 0 comments

Comments

@DavidHuebner
Copy link
Collaborator

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.

  1. Load a CAS with label information / annotations into the _InitialView.
  2. Rename the _InitialView to goldView.
  3. Make predictions with a model/pipeline and store the predictions in the _initialView.
  4. 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

  1. renames the currently active View, which is specified in cas._current_view, to view_name
  2. switches the cas._current_view to view_name
  3. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant