Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

9
LINES

< > BotCompany Repo | #1023923 // apertium_translate - use locally installed Apertium to translate

JavaX fragment (include)

// languagePair = e.g. "eng-spa"
sS apertium_translate(S languagePair, S s) {
  File inFile = createTempFile(), outFile = createTempFile();
  temp tempDeleteFile(inFile);
  temp tempDeleteFile(outFile);
  saveTextFile(inFile, s);
  backtick_verbose("apertium -u " + languagePair + " " + platformQuote(inFile) + " " + platformQuote(outFile));
  ret loadTextFile(outFile);
}

Author comment

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: 124 / 178
Referenced in: [show references]