CQP query syntax

Hi all,

I'm trying to do corpus analysis in R (using polmineR, if anyone knows it) and having trouble arranging my syntax for a query. I want to basically ask R to find all items in the corpus containing at least one out of 3 groups of words, and at least one word from each of the 3 groups. So here's what I want:

query <- [one group of words] & [another group of words] & [third group of words]

Here's a brief version of what I've been trying:

query_mig <- '[word = ".*[aA]usländer.*" | word = ".*[mM]igration.*"] 
     & [word = "Deutschland" | word = "Bundesrepublik" | word = "BRD"]
     & [word = ".*[iI]ntegration.*" | word = ".*[aA]bschieb.*"]'

But that can't be right because when I add words, the number of articles included in the result doesn't change. Can anyone advise me as to what I might be doing wrong? I've been doing a lot of googling and can't find the answer.

Thank you so much!


Hello @efrank413 ,

I see that you already asked this question in https://github.com/PolMine/polmineR/issues/193 . If you don't get a quick response on that, you could also try a more general (non R) forum, because it is not directly related to R.

Hi @HanOostdijk,

Thanks for the response! Sorry if I doubled-posted as I am relatively new to R and R forums. I thought the question was R-related since I'm writing syntax for R. I will search for a more general forum if I don't get an answer here.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.