Complete novice in R, trying to use quanteda to apply a unique dictionary onto the UK parlspeech corpus. Initially, I hoped to build a dictionary of terms that might capture citations to specific studies or groups, and built a dictionary around terms like "according to X" and "y says," but found no hits when I applied it my dfm earlier today. I created less specific dictionaries and confirmed that the groups I'm looking for appear, and the citation phrases I came up with do too. Ok, fine they probably don't appear together, I'm happy to admit my dictionary has minimal recall, but I decided to add a few more phrases to it to really cover my tracks and see if I can think of other ways a person might cite research in a parliamentary debate.
Now, for some reason, when I create that dictionary, R copies into the console it as normal but does not create the dictionary. No error, but no object in the environment. Then, if I run the code again, I get the following error:
Error: unexpected symbol in: "n of small businesses hope*", "federation of small businesses need*", "federation of small businesses testimony", "federation of small businesses testif*", "federation of small businesse groupdictionary<- dictionary(list(uniongroupreferences=c("according"
It is both pointing to a typo in that section that ends "businesse" and then repeating the start of my dictionary. R accepts and adds all the other dictionaries I have created, and this one is set up with the same formatting. Another one, identical except for the group names, works fine, and another with just the group names works too. I tried removing that passage to see if there is really a typo there, but then in just lists the same error for the terms right before it.
Again, I created what was essentially the same dictionary (minus maybe 10 phrases) earlier today, and I am almost certain it won't recall any results either, but I would like to make sure and am puzzled that this specific dictionary does not seem to work while all the others do.
The dictionary in question is rather long:
grouprefdictionary<- dictionary(list(uniongroupreferences=c("according to the tuc", "tuc says", "tuc concerns", "tuc is concerned", "tuc fears", "tuc worries", "tuc is worried", "tuc wants", "tuc hopes", "tuc needs", "tuc testimony", "tuc testif*", "tuc stud*", "tuc report*", "tuc publ*", "according to the trade union congress", "trade union congress says", "trade union congress concerns", "trade union congress is concerned", "trade union congress fears", "trade union congress worries", "trade union congress is worried", "trade union congress wants", "trade union congress hopes", "trade union congress needs", "trade union congress testimony", "trade union congress testif*", "trade union congress stud*", "trade union congress publ*", "according to the gmb", "gmb says", "gmb concerns", "gmb is concerned", "gmb fears", "gmb worries", "gmb is worried", "gmb wants", "gmb hopes", "gmb needs", "gmb testimony", "gmb testif*", "gmb stud*", "gmb report*", "gmb publ*", "according to unison", "unison says", "unison concerns", "unison is concerned", "unison fears", "unison worries", "unison is worried", "unison wants", "unison hopes", "unison needs", "unison testimony", "unison testif*", "unison stud*", "unison report*", "unison publ*", "according to unite", "unite says", "unite concerns", "unite is concerned", "unite fears", "unite worries", "unite is worried", "unite wants", "unite hopes", "unite needs", "unite testimony", "unite testif*", "unite stud*", "unite report*", "unite publ*"), businessgroupreferences=c("according to the cbi", "cbi says", "cbi concerns", "cbi is concerned", "cbi fears", "cbi worries", "cbi is worried", "cbi wants", "cbi hopes", "cbi needs", "cbi testimony", "cbi testif*", "cbi stud*", "cbi report*", "cbi publ*", "according to the confederation of british industry", "confederation of british industry says", "confederation of british industry concerns", "confederation of british industry is concerned", "confederation of british industry fears", "confederation of british industry worries", "confederation of british industry is worried", "confederation of british industry wants", "confederation of british industry hopes", "confederation of british industry needs", "confederation of british industry testimony", "confederation of british industry testif*", "confederation of british industry stud*", "confederation of british industry report*", "confederation of british industry publ*", "according to the bcc", "bcc says", "bcc concerns", "bcc is concerned", "bcc fears", "bcc worries", "bcc is worried", "bcc wants", "bcc hopes", "bcc needs", "bcc testimony", "bcc testif*", "bcc stud*", "bcc report*", "bcc publ*", "according to the british chamber* of commerce", "british chamber* of commerce say*", "british chamber* of commerce concerns", "british chambers of commerce are concerned", "british chamber* of commerce is concerned", "british chamber* of commerce fear*", "british chamber* of commerce worry", "british chamber* of commerce worries", "british chambers of commerce are worried", "british chamber* of commerce is worried", "british chamber* of commerce hope*", "british chamber* of commerce need*", "british chamber* of commerce testimony*", "british chamber* of commerce testif*", "british chamber* of commerce stud*", "british chamber* of commerce report*", "british chamber* of commerce publ*", "according to the fsb", "fsb says", "fsb concerns", "fsb is concerned", "fsb fears", "fsb worries", "fsb is worried", "fsb wants", "fsb hopes", "fsb needs", "fsb testimony", "fsb testif*", "fsb stud*", "fsb report*", "fsb publ*", "according to the federation of small businesses", "federation of small businesses says", "federation of small businesses concerns", "federation of small businesses is concerned", "federation of small businesses fear*", "federation of small businesses worries", "federation of small businesses is worried", "federation of small businesses hope*", "federation of small businesses need*", "federation of small businesses testimony", "federation of small businesses testif*", "federation of small businesses stud*", "federation of small businesses report*", "federation of small businesses publ*", "according to the iod", "iod says", "iod concerns", "iod is concerned", "iod fears", "iod worries", "iod is worried", "iod wants", "iod hopes", "iod needs", "iod testimony", "iod testif*", "iod stud*", "iod report*", "iod publ*", "according to the institute of directors", "institute of directors says", "institute of directors concerns", "institute of directors is concerned", "institute of directors fear*", "institute of directors worries", "institute of directors is worried", "institute of directors hope*", "institute of directors need*", "institute of directors testimony", "institute of directors testif*", "institute of directors stud*", "institute of directors report*", "institute of directors publ*")))
Thanks in advance,
Sincerely and profoundly lost