jackrusher / mundaneum

A clojure wrapper around WikiData
BSD Zero Clause License
128 stars 16 forks source link

(entity "ระยอง") doesn't work. #5

Closed veer66 closed 5 years ago

veer66 commented 5 years ago
(require '[mundaneum.query :refer [entity]])
(entity "ระยอง")

It returned nil, which I suppose it shouldn't.

jackrusher commented 5 years ago

As per the README, entity resolution is:

currently sadly restricted to English in this code

I intend to add an optional second parameter to those functions plus a dynamic variable to set the default language, but currently everything is hard-coded to use English labels.

veer66 commented 5 years ago

I should have label this issue as a feature request.

jackrusher commented 5 years ago

I've fixed entity to use the mundaneum.query/*default-language* dynamic variable to control which language is to be used for queries. One can now bind that variable like this:

(binding [mundaneum.query/*default-language* "th"]
 (entity "ระยอง"))
;;=>"Q395325"

I'll push the update after I've fixed the weird problem with the test runner. :)