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

cooccurrences with more than one positional attribute #208

Closed
ChristophLeonhardt opened this issue May 19, 2022 · 2 comments
Closed

cooccurrences with more than one positional attribute #208

ChristophLeonhardt opened this issue May 19, 2022 · 2 comments

Comments

@ChristophLeonhardt
Copy link
Contributor

In earlier versions of polmineR, it was possible to pass more than one p-attribute to cooccurrences() as illustrated in the slides here (the result is shown on the following slide).

In polmineR 0.8.6.9003 this does not work anymore. Using the example from the slide here, passing one p-attribute still works as expected.

mmh_query <- '"Menschen" "mit" "Migrationshintergrund"'
cooccurrences("GERMAPARL", query = mmh_query, p_attribute = "word")

But adding a second p-attribute as shown in the example throws an error.

cooccurrences("GERMAPARL", query = mmh_query, p_attribute = c("word", "pos"))

Error in .region_matrix_context(corpus = corpus, registry = registry, :
Expecting a single string value: [type=character; extent=2].

@ablaette
Copy link
Collaborator

Good point. This is the example I use for recovering the ability of cooccurrences() to handle two p-attributes:

corpus("GERMAPARLMINI") %>%
  cooccurrences(query = "Arbeit", p_attribute = c("word", "pos"))

@ablaette
Copy link
Collaborator

Fixed.

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

2 participants