Thank you very much for your response.

Checking what you say, I copied the modes directly to the other path and now 
apertium -l does get the modes including the one I created (previously it was 
*). But for example, if I do:

curl http://localhost:2737/listPairs

{"responseData": [{"sourceLanguage": "spa", "targetLanguage": "ast"}, 
{"sourceLanguage": "ast", "targetLanguage": "spa"}], "responseDetails": null, 
"responseStatus": 200}

In the Dockerfile, I launch it with:

ENTRYPOINT ["python3", "/root/apertium-apy/servlet.py", "--lang-names", 
"/root/apertium-apy/langNames.db"]
CMD ["/usr/local/share/apertium/modes", "--port", "2737"]

So I understand that it should use that modes path. I don't know if I should 
add something to the language_names folder (I tried without success).

De: Tino Didriksen <m...@tinodidriksen.com>
Fecha: jueves, 13 de marzo de 2025, 9:51
Para: [apertium-stuff] <apertium-stuff@lists.sourceforge.net>
CC: Víctor Sandín <vsan...@astibot.es>
Asunto: Re: Apertium Inquiry
If you used the mailing list, more people would be able to answer.

APy from apt-get by default looks in /usr/share/apertium/modes. A pair
built from source and "make install" by default installs into
/usr/local and is thus not visible to /usr

You can run the pair's configure with --prefix=/usr to change where it
is installed (but this is strongly discouraged - only do that in a
container), or you can point APy's systemd service at /usr/local
instead (also container), or you can run APy manually and point it at
/usr/local

-- Tino Didriksen

On Thu, 13 Mar 2025 at 07:44, Víctor Sandín <vsan...@astibot.es> wrote:
>
> Hi again Tino,
>
>
>
> I'd like to ask a question, see if you can help. It turns out that if I want 
> to generate a new dictionary with the language pair spamedical|astmedical 
> (they use spa and ast for monolingual), I run the following command from the 
> container terminal to Apertium:
>
> echo 'Cuestion medica' | apertium -d /usr/local/share/apertium 
> spamedical-astmedical
>
> I do get the expected output for the dictionary I created for that pair, but 
> if I make the request with curl, it tells me the pair isn't installed (if I 
> do listPairs, it doesn't appear either).
>
>
>
> From what I've been checking, I've tried adding the lines:
>
> frp spamedical spamedical
>
> frp astmedical astmedical
>
> in the manual-additions.tsv file, but I haven't found a solution.
>
>
>
> If you could help me, it's for a university project, and I'm a bit desperate.
>
>
>
> Best regards and best wishes.
_______________________________________________
Apertium-stuff mailing list
Apertium-stuff@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/apertium-stuff

Reply via email to