voikko / corevoikko

Libvoikko and essential linguistic resources
Other
89 stars 25 forks source link

DICTIONARY_PATH looks incorrect #13

Closed TinoDidriksen closed 9 years ago

TinoDidriksen commented 9 years ago

From what I can see, DICTIONARY_PATH is $PREFIX/lib/voikko/ by default, but this is wrong for three reasons.

  1. The platform specific path will have an arch specific folder on correctly configured builds, such as /usr/lib/x86_64-linux-gnu/voikko/ on Debian.
  2. $PREFIX is not enough. It should first check $DICTIONARY_PATH, then /usr/local, then /usr, etc.
  3. The dictionary data is not actually platform specific, so it should all be in $PREFIX/share/voikko/ instead.
hatapitk commented 9 years ago

Dictionary format 2 is platform specific so $PREFIX/share would not work for that. But indeed the default $PREFIX/lib/voikko/ is not as useful as it used to be.

I would in fact consider removing the default dictionary path completely because in addition to these three reasons 4) we now support Windows and Android where these paths would be wrong or useless.