1 | // languagePair = e.g. "eng-spa" |
2 | sS apertium_translate(S languagePair, S s) {
|
3 | File inFile = createTempFile(), outFile = createTempFile(); |
4 | temp tempDeleteFile(inFile); |
5 | temp tempDeleteFile(outFile); |
6 | saveTextFile(inFile, s); |
7 | backtick_verbose("apertium -u " + languagePair + " " + platformQuote(inFile) + " " + platformQuote(outFile));
|
8 | ret loadTextFile(outFile); |
9 | } |
Began life as a copy of #1023921
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, whxojlpjdney
No comments. add comment
| Snippet ID: | #1023923 |
| Snippet name: | apertium_translate - use locally installed Apertium to translate |
| Eternal ID of this version: | #1023923/1 |
| Text MD5: | 908976934cd1ae05edf73da7712e5563 |
| Author: | stefan |
| Category: | javax / translations |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2019-07-12 17:59:49 |
| Source code size: | 380 bytes / 9 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 415 / 479 |
| Referenced in: | [show references] |