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

Disable highlights annotation for existing kwic-objects #286

Open
DSauerbrey opened this issue Feb 21, 2024 · 2 comments
Open

Disable highlights annotation for existing kwic-objects #286

DSauerbrey opened this issue Feb 21, 2024 · 2 comments

Comments

@DSauerbrey
Copy link

DSauerbrey commented Feb 21, 2024

Any options to disable highlights annotations for existing kwic-objects to avoid that using the count method on already manually annotated kwic-objects will count highlighted terms with the existing tags included (e.g. <'span style="background-color:yellow">Arbeitsaufnahmeverbot</span'>)?

@DSauerbrey
Copy link
Author

I could avoid a subsequent problem, occurring when using the features-function i. a. on the resulting count-object to create a dot plot, by transforming the features-object to a data.frame before using the dplyr-function ‘mutate’ (e. g. > mutate(word = recode(word, "<span style="background-color:yellow">Arbeitsaufnahmeverbot" = "Arbeitsaufnahmeverbot")) to manually remove the unwanted annotations. However, this was only a convenient solution because I focused on 20 terms with the highest log-likelihood-rank and because of the fact that the other count-object has also been manipulated by the same annotation problem – else the same word would have been counted the first time with annotations and the second time without annotations.

@DSauerbrey
Copy link
Author

The same request to have a counterpart for the enrich-function applies not only for the highlights annotations but also for annotations using structural attributes (e. g. dates). Planning to create a time series for the aforementioned kwic-object, deriving from ‘protocol_date’ as a structural attribute while also having ‘speaker_parlgroup’ as a further attribute, I had to create a separate data.table, integrating only ‘protocol_date’ as a column, instead of directly creating a data.frame by using the meta data of the kwic-object.

Thank you in advance for any hints and further advice!

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