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

Convenience for setting the document language #250

Closed
reckart opened this issue Mar 14, 2022 · 0 comments
Closed

Convenience for setting the document language #250

reckart opened this issue Mar 14, 2022 · 0 comments
Assignees
Milestone

Comments

@reckart
Copy link
Member

reckart commented Mar 14, 2022

Is your feature request related to a problem? Please describe.
In order to set the document language, I have to search and retrieve the document annotation from the CAS and then set the language feature. If there is no document annotation yet, I have to create one.

Describe the solution you'd like
In the UIMA Java SDK, there is a convenience method for setting the document language which automatically creates a document annotation if there is none yet. Would be nice if cassis also had that.

cas.document_language = "en"  # following the `CAS.setDocumentLanguage(...)` from the Java SDK - or -
cas.language = "en"           # following the feature name
@jcklie jcklie added this to the 0.8.0 milestone Mar 25, 2022
@reckart reckart self-assigned this Feb 4, 2024
reckart added a commit that referenced this issue Feb 4, 2024
- Added get_document_annotation()
- Added document_language property
- Added test
reckart added a commit that referenced this issue Feb 4, 2024
reckart added a commit that referenced this issue Feb 4, 2024
reckart added a commit that referenced this issue Feb 4, 2024
reckart added a commit that referenced this issue Feb 4, 2024
reckart added a commit that referenced this issue Feb 4, 2024
…g-the-document-language

#250 - Convenience for setting the document language
@reckart reckart closed this as completed Feb 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants