seancarmody / ngramr

R package to query the Google Ngram Viewer
Other
48 stars 9 forks source link

Recent versions of ngramr failing simple example test #44

Closed spegmb closed 1 year ago

spegmb commented 1 year ago

This simple call from the README seems to now systematically return a NULL: ng <- ngram(c("hacker", "programmer"), year_start = 1950)

I have tried the current dev version 1.9.2 as well as 1.9.1 and 1.9.0, with the same result.

It seems to me that the query gets formed properly, I was able to land to the right page using the query that was generated. Pulling the html data does not generate an error, and the html itself appears to hold the data we want to extract. It's when the html data is fed into the function ngram_fetch_data that apparently there is an issue. I don't know html/xml well enough to identify the issue, but I presume that Google must have changed something.

seancarmody commented 1 year ago

From time to time Google changes the format of the data returned, which breaks the package. It looks like that has happened again so I will need to take a look and revise the package. Stay tuned!

danhart228 commented 1 year ago

Thanks Sean! Very much appreciated! Dan Hart

seancarmody commented 1 year ago

Fixed on GitHub (so you can download that in the meantime) and I will resubmit to CRAN

spegmb commented 1 year ago

Thank you so much for the fix, Sean. Working perfectly as far as I can tell. Your package makes it really very practical to extract and organize the ngram data.

seancarmody commented 1 year ago

You're welcome!

On Mon, Jan 16, 2023 at 6:44 PM spegmb @.***> wrote:

Thank you so much for the fix, Sean. Working perfectly as far as I can tell. Your package makes it really very practical to extract and organize the ngram data.

— Reply to this email directly, view it on GitHub https://github.com/seancarmody/ngramr/issues/44#issuecomment-1383611605, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAFVWI6RV6DFM4E7JLFGRTWST36PANCNFSM6AAAAAAT34ZQYQ . You are receiving this because you commented.Message ID: @.***>

-- Sean Carmody Twitter: http://twitter.com/seancarmody Blog: The Stubborn Mule

danhart228 commented 1 year ago

Yes, thanks so much!

Daniel Hart University Professor Rutgers University


From: Sean Carmody @.> Sent: Monday, January 16, 2023 2:47 AM To: seancarmody/ngramr @.> Cc: Daniel Hart @.>; Comment @.> Subject: Re: [seancarmody/ngramr] Recent versions of ngramr failing simple example test (Issue #44)

You're welcome!

On Mon, Jan 16, 2023 at 6:44 PM spegmb @.***> wrote:

Thank you so much for the fix, Sean. Working perfectly as far as I can tell. Your package makes it really very practical to extract and organize the ngram data.

— Reply to this email directly, view it on GitHub https://github.com/seancarmody/ngramr/issues/44#issuecomment-1383611605, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAFVWI6RV6DFM4E7JLFGRTWST36PANCNFSM6AAAAAAT34ZQYQ . You are receiving this because you commented.Message ID: @.***>

-- Sean Carmody Twitter: http://twitter.com/seancarmody Blog: The Stubborn Mule

— Reply to this email directly, view it on GitHubhttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fseancarmody%2Fngramr%2Fissues%2F44%23issuecomment-1383613652&data=05%7C01%7Chart%40camden.rutgers.edu%7C15ebc64e6e42405d7e4308daf795e843%7Cb92d2b234d35447093ff69aca6632ffe%7C1%7C0%7C638094520469989208%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=aRYS9cG11qss%2BrrGw6JPdmoVvvLC9EjEI7mxGiFhoAo%3D&reserved=0, or unsubscribehttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FA266SFCMHN3VKYCKBJIMZ2DWST4IXANCNFSM6AAAAAAT34ZQYQ&data=05%7C01%7Chart%40camden.rutgers.edu%7C15ebc64e6e42405d7e4308daf795e843%7Cb92d2b234d35447093ff69aca6632ffe%7C1%7C0%7C638094520470145876%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=vS98nB%2FqyLEAdlKvXr2jItBmree3myU3khI2fqBqqKA%3D&reserved=0. You are receiving this because you commented.Message ID: @.***>

seancarmody commented 1 year ago

1.9.3 is now up on the main CRAN site. It will take a little longer to propagate to all of the mirror sites