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

Reading speeches #282

Open
ChristophLeonhardt opened this issue Nov 20, 2023 · 0 comments
Open

Reading speeches #282

ChristophLeonhardt opened this issue Nov 20, 2023 · 0 comments

Comments

@ChristophLeonhardt
Copy link
Contributor

Until recently, the workflow to read speeches from speech bundles in polmineR has been the following:

speeches <- corpus("GERMAPARL2") %>%
  subset(protocol_date == "2001-09-12") %>%
  subset(p) %>%
  as.speeches(
    s_attribute_date = "protocol_date",
    s_attribute_name = "speaker_name"
  )

speeches[[1]] %>% read()

This is also described in a blog post for a GermaParl2 beta release here.

In polmineR v0.8.9.9001 (maybe earlier) this does not work anymore as this throws an error: "s-attribute does not have values".

What does work instead is the following:

speeches <- corpus("GERMAPARL2") %>%
  subset(protocol_date == "2001-09-12") %>%
  subset(p_type == "speech") %>%
  as.speeches(
    s_attribute_date = "protocol_date",
    s_attribute_name = "speaker_name"
  )

speeches[[1]] %>% read()

This uses p_type instead of p.

However, I assume that the result is not identical. In the second scenario, I omit all interjections (although they remain visible in the output of read()) while I keep all paragraphs in the first scenario.

What is the expected behavior in these scenarios and how would I read speeches without necessarily removing the interjections first (in case I might want to analyze the speech bundle further)?

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