Page MenuHomePhabricator

Please install dictionaries on Toolforge
Closed, ResolvedPublic

Description

The wiki-ai/revscoring Python package (and in general tools processing natural language) require dictionaries. I would therefore like to request that aspell, myspell and hunspell dictionaries are made available to tools hosted on Toolforge. The aspell and hunspell packages are already installed and it seems that it is just the dictionaries which are missing.

From wiki-ai/revscoring:

apt-get install aspell-ar aspell-bn aspell-is myspell-cs myspell-nl myspell-en-us myspell-en-gb myspell-en-au myspell-et voikko-fi myspell-fr myspell-de-at myspell-de-ch myspell-de-de myspell-he myspell-hr myspell-hu aspell-id myspell-it myspell-nb myspell-fa aspell-pl myspell-pt myspell-es hunspell-sr aspell-sv aspell-ta myspell-ru myspell-uk hunspell-vi aspell-el myspell-lv aspell-ro myspell-ca

Related Objects

Event Timeline

Cirdan renamed this task from Please install to Please install dictionaries on Toolforge.May 29 2018, 3:32 PM

Is it possible to install these dictionaries locally to the tool, instead of system-wide accross the grid?

Cirdan closed this task as Resolved.EditedMay 29 2018, 4:03 PM
Cirdan claimed this task.

Yes, it is, sorry for not looking into this more thoroughly. I was under the impression that I would need to collect sources and compile them, while in fact it is possible to make use of the Ubuntu packages.

Here is a brief how-to/demo in case anybody is searching for this in the future:

~$ mkdir dicts
~$ cd dicts
~$ aptitude download myspell-de-de
~$ ar x myspell-de-de-<VERSION>.deb
~$ tar -xf data.tar.gz
~$ cd ./usr/share/myspell/dicts/
~$ python
>>> import enchant
>>> d = enchant.dict("de-DE")
...
enchant.errors.DictNotFoundError: Dictionary for language 'de-DE' could not be found
>>> enchant.set_param("enchant.myspell.dictionary.path", ".")
>>> d = enchant.Dict("de-DE")
>>> d.check("Erfolg")
True

The remaining files from the .deb package can be removed afterwards. However, I found that the usr/share/... structure needs to stay the way it is.

Vvjjkkii renamed this task from Please install dictionaries on Toolforge to l2baaaaaaa.Jul 1 2018, 1:07 AM
Vvjjkkii reopened this task as Open.
Vvjjkkii removed Cirdan as the assignee of this task.
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed a subscriber: Aklapper.
CommunityTechBot renamed this task from l2baaaaaaa to Please install dictionaries on Toolforge.Jul 2 2018, 3:24 PM
CommunityTechBot closed this task as Resolved.
CommunityTechBot assigned this task to Cirdan.
CommunityTechBot raised the priority of this task from High to Needs Triage.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added a subscriber: Aklapper.