Hi, Apertium APy, Apertium API in Python, is a web server exposing Apertium morphological functions including text, document and webpage translation.
Also attached is its dependency apertium-streamparser: apertium-streamparser is a Python 3 library to parse the Apertium stream format, generating LexicalUnits. You can test apertium-apy easily: install the language pairs you're interested in (e.g., "pkg_add apertium-en-es apertium-es-fr"), rcctl enable apertium_apy && rcctl start apertium_apy. You can then list the installed language pairs and translate text: $ ftp -o - http://localhost:2737/list 2>/dev/null {"responseData": [{"sourceLanguage": "eng", "targetLanguage": "spa"}, {"sourceLanguage": "spa", "targetLanguage": "eng"}, {"sourceLanguage": "spa", "targetLanguage": "eng_US"}, {"sourceLanguage": "spa", "targetLanguage": "fra"}, {"sourceLanguage": "fra", "targetLanguage": "spa"}], "responseDetails": null, "responseStatus": 200} $ ftp -o - 'http://localhost:2737/translate?langpair=en|es&q=good' \ 2>/dev/null {"responseData": {"translatedText": "Es muy bueno"}, "responseDetails": null, "responseStatus": 200} $ ftp -o - 'http://localhost:2737/translate?langpair=es|fr&q=bueno' \ 2>/dev/null {"responseData": {"translatedText": "Bon"}, "responseDetails": null, "responseStatus": 200} If you'd like a Google Translate-like interface, you can get that too, by building https://github.com/apertium/apertium-html-tools and serving the resulting (static) files with httpd. ok? -- Anthony J. Bentley
Index: user.list =================================================================== RCS file: /cvs/ports/infrastructure/db/user.list,v retrieving revision 1.328 diff -u -p -r1.328 user.list --- user.list 12 Nov 2018 14:04:27 -0000 1.328 +++ user.list 20 Nov 2018 04:27:40 -0000 @@ -330,3 +330,4 @@ id user group port options 819 _nomad _nomad sysutils/nomad 820 _arpwatch _arpwatch net/arpwatch 821 _tenshi _tenshi sysutils/tenshi +822 _apertium-apy _apertium-apy www/apertium-apy
apertium-apy.tar.gz
Description: apertium-apy.tar.gz
apertium-streamparser.tar.gz
Description: apertium-streamparser.tar.gz
