dkpro / dkpro-cassis

UIMA CAS processing library written in Python
https://pypi.org/project/dkpro-cassis/
Apache License 2.0
84 stars 22 forks source link

Convenience for setting the document language #250

Closed reckart closed 5 months ago

reckart commented 2 years ago

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