Ironholds / WikidataR

An R package for the Wikidata API
Other
53 stars 14 forks source link

The language option does not seem to work #27

Open maelle opened 7 years ago

maelle commented 7 years ago

Awesome package!

I think the language option doesn't work.

E.g. find_item("Wonder Girls", "en") and find_item("Wonder Girls", "es") return the same results.

maelle commented 7 years ago

But then I think it might be normal sorry!

Ironholds commented 7 years ago

Are you sure it works? It's not showing anything different for me either! (Nice choice of examples, btw - good to know there's more than one k-pop fan in the R community)

maelle commented 7 years ago

This is the example from the unit tests, I'm sorry to say I don't know anything about k-pop :wink:

I think it works although it's in English? I've tried with a Swedish actor who has a Wikipedia page in Swedish but not in English.

library("WikidataR")
find_item("Jacob Nordenson", "en")
#> 
#>  Wikidata item search
#> 
#> Number of results:    1 
#> 
#> Results:
#> 1     Jacob Nordenson (Q6014820) - Swedish actor
find_item("Jacob Nordenson", "sv")
#> 
#>  Wikidata item search
#> 
#> Number of results:    1 
#> 
#> Results:
#> 1     Jacob Nordenson (Q6014820) - Swedish actor

Should we expect the second result to be written in Swedish? :thinking:

In my case it was fine because I just wanted to get the ID for the people I had queried (use case = this blog post). Re-opening for further discussion!

Ironholds commented 7 years ago

Iiiinteresting. Let me dig into it!