Sat, 07 Jul 2018 14:38:13 +0200
Translator: added a translation engine for the IBM Watson Language Translator.
6018
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
1 | <!DOCTYPE html> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
2 | <html><head> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
3 | <title>eric6.Plugins.UiExtensionPlugins.Translator.TranslatorEngines.TranslationEngine</title> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
4 | <meta charset="UTF-8"> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
5 | <style> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
6 | body { |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
7 | background: #EDECE6; |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
8 | margin: 0em 1em 10em 1em; |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
9 | color: black; |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
10 | } |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
11 | |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
12 | h1 { color: white; background: #85774A; } |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
13 | h2 { color: white; background: #85774A; } |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
14 | h3 { color: white; background: #9D936E; } |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
15 | h4 { color: white; background: #9D936E; } |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
16 | |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
17 | a { color: #BA6D36; } |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
18 | |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
19 | </style> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
20 | </head> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
21 | <body><a NAME="top" ID="top"></a> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
22 | <h1>eric6.Plugins.UiExtensionPlugins.Translator.TranslatorEngines.TranslationEngine</h1> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
23 | <p> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
24 | Module implementing the translation engine base class. |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
25 | </p> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
26 | <h3>Global Attributes</h3> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
27 | <table> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
28 | <tr><td>None</td></tr> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
29 | </table> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
30 | <h3>Classes</h3> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
31 | <table> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
32 | <tr> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
33 | <td><a href="#TranslationEngine">TranslationEngine</a></td> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
34 | <td>Class implementing the translation engine base class containing default methods.</td> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
35 | </tr> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
36 | </table> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
37 | <h3>Functions</h3> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
38 | <table> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
39 | <tr><td>None</td></tr> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
40 | </table> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
41 | <hr /><hr /> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
42 | <a NAME="TranslationEngine" ID="TranslationEngine"></a> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
43 | <h2>TranslationEngine</h2> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
44 | <p> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
45 | Class implementing the translation engine base class containing |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
46 | default methods. |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
47 | </p> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
48 | <h3>Derived from</h3> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
49 | QObject |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
50 | <h3>Class Attributes</h3> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
51 | <table> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
52 | <tr><td>None</td></tr> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
53 | </table> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
54 | <h3>Class Methods</h3> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
55 | <table> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
56 | <tr><td>None</td></tr> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
57 | </table> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
58 | <h3>Methods</h3> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
59 | <table> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
60 | <tr> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
61 | <td><a href="#TranslationEngine.__init__">TranslationEngine</a></td> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
62 | <td>Constructor</td> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
63 | </tr><tr> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
64 | <td><a href="#TranslationEngine.engineName">engineName</a></td> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
65 | <td>Public method to get the name of the engine.</td> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
66 | </tr><tr> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
67 | <td><a href="#TranslationEngine.getTextToSpeechData">getTextToSpeechData</a></td> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
68 | <td>Public method to pronounce the given text.</td> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
69 | </tr><tr> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
70 | <td><a href="#TranslationEngine.getTranslation">getTranslation</a></td> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
71 | <td>Public method to translate the given text.</td> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
72 | </tr><tr> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
73 | <td><a href="#TranslationEngine.hasTTS">hasTTS</a></td> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
74 | <td>Public method indicating the Text-to-Speech capability.</td> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
75 | </tr><tr> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
76 | <td><a href="#TranslationEngine.supportedLanguages">supportedLanguages</a></td> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
77 | <td>Public method to get the supported languages.</td> |
6411
7fd9b7ecbcfe
Translator: added a translation engine for the IBM Watson Language Translator.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6018
diff
changeset
|
78 | </tr><tr> |
7fd9b7ecbcfe
Translator: added a translation engine for the IBM Watson Language Translator.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6018
diff
changeset
|
79 | <td><a href="#TranslationEngine.supportedTargetLanguages">supportedTargetLanguages</a></td> |
7fd9b7ecbcfe
Translator: added a translation engine for the IBM Watson Language Translator.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6018
diff
changeset
|
80 | <td>Public method to get a list of supported target languages for an original language.</td> |
6018
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
81 | </tr> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
82 | </table> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
83 | <h3>Static Methods</h3> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
84 | <table> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
85 | <tr><td>None</td></tr> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
86 | </table> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
87 | <a NAME="TranslationEngine.__init__" ID="TranslationEngine.__init__"></a> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
88 | <h4>TranslationEngine (Constructor)</h4> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
89 | <b>TranslationEngine</b>(<i>plugin, parent=None</i>) |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
90 | <p> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
91 | Constructor |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
92 | </p><dl> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
93 | <dt><i>plugin</i></dt> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
94 | <dd> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
95 | reference to the plugin object (TranslatorPlugin) |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
96 | </dd><dt><i>parent</i></dt> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
97 | <dd> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
98 | reference to the parent object (QObject) |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
99 | </dd> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
100 | </dl><a NAME="TranslationEngine.engineName" ID="TranslationEngine.engineName"></a> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
101 | <h4>TranslationEngine.engineName</h4> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
102 | <b>engineName</b>(<i></i>) |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
103 | <p> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
104 | Public method to get the name of the engine. |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
105 | </p><dl> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
106 | <dt>Returns:</dt> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
107 | <dd> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
108 | engine name (string) |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
109 | </dd> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
110 | </dl><a NAME="TranslationEngine.getTextToSpeechData" ID="TranslationEngine.getTextToSpeechData"></a> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
111 | <h4>TranslationEngine.getTextToSpeechData</h4> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
112 | <b>getTextToSpeechData</b>(<i>requestObject, text, language</i>) |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
113 | <p> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
114 | Public method to pronounce the given text. |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
115 | </p><dl> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
116 | <dt><i>requestObject</i></dt> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
117 | <dd> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
118 | reference to the request object |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
119 | (TranslatorRequest) |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
120 | </dd><dt><i>text</i></dt> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
121 | <dd> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
122 | text to be pronounced (string) |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
123 | </dd><dt><i>language</i></dt> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
124 | <dd> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
125 | language code of the text (string) |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
126 | </dd> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
127 | </dl><dl> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
128 | <dt>Returns:</dt> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
129 | <dd> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
130 | tuple with pronounce data (QByteArray) or error string (string) |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
131 | and success flag (boolean) |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
132 | </dd> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
133 | </dl><a NAME="TranslationEngine.getTranslation" ID="TranslationEngine.getTranslation"></a> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
134 | <h4>TranslationEngine.getTranslation</h4> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
135 | <b>getTranslation</b>(<i>requestObject, text, originalLanguage, translationLanguage</i>) |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
136 | <p> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
137 | Public method to translate the given text. |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
138 | </p><dl> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
139 | <dt><i>requestObject</i></dt> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
140 | <dd> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
141 | reference to the request object |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
142 | (TranslatorRequest) |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
143 | </dd><dt><i>text</i></dt> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
144 | <dd> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
145 | text to be translated (string) |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
146 | </dd><dt><i>originalLanguage</i></dt> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
147 | <dd> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
148 | language code of the original (string) |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
149 | </dd><dt><i>translationLanguage</i></dt> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
150 | <dd> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
151 | language code of the translation (string) |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
152 | </dd> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
153 | </dl><dl> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
154 | <dt>Returns:</dt> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
155 | <dd> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
156 | tuple of translated text (string) and flag indicating |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
157 | success (boolean) |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
158 | </dd> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
159 | </dl><a NAME="TranslationEngine.hasTTS" ID="TranslationEngine.hasTTS"></a> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
160 | <h4>TranslationEngine.hasTTS</h4> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
161 | <b>hasTTS</b>(<i></i>) |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
162 | <p> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
163 | Public method indicating the Text-to-Speech capability. |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
164 | </p><dl> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
165 | <dt>Returns:</dt> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
166 | <dd> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
167 | flag indicating the Text-to-Speech capability (boolean) |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
168 | </dd> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
169 | </dl><a NAME="TranslationEngine.supportedLanguages" ID="TranslationEngine.supportedLanguages"></a> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
170 | <h4>TranslationEngine.supportedLanguages</h4> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
171 | <b>supportedLanguages</b>(<i></i>) |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
172 | <p> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
173 | Public method to get the supported languages. |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
174 | </p><dl> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
175 | <dt>Returns:</dt> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
176 | <dd> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
177 | list of supported language codes (list of string) |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
178 | </dd> |
6411
7fd9b7ecbcfe
Translator: added a translation engine for the IBM Watson Language Translator.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6018
diff
changeset
|
179 | </dl><a NAME="TranslationEngine.supportedTargetLanguages" ID="TranslationEngine.supportedTargetLanguages"></a> |
7fd9b7ecbcfe
Translator: added a translation engine for the IBM Watson Language Translator.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6018
diff
changeset
|
180 | <h4>TranslationEngine.supportedTargetLanguages</h4> |
7fd9b7ecbcfe
Translator: added a translation engine for the IBM Watson Language Translator.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6018
diff
changeset
|
181 | <b>supportedTargetLanguages</b>(<i>original</i>) |
7fd9b7ecbcfe
Translator: added a translation engine for the IBM Watson Language Translator.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6018
diff
changeset
|
182 | <p> |
7fd9b7ecbcfe
Translator: added a translation engine for the IBM Watson Language Translator.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6018
diff
changeset
|
183 | Public method to get a list of supported target languages for an |
7fd9b7ecbcfe
Translator: added a translation engine for the IBM Watson Language Translator.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6018
diff
changeset
|
184 | original language. |
7fd9b7ecbcfe
Translator: added a translation engine for the IBM Watson Language Translator.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6018
diff
changeset
|
185 | </p><dl> |
7fd9b7ecbcfe
Translator: added a translation engine for the IBM Watson Language Translator.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6018
diff
changeset
|
186 | <dt><i>original</i> (str)</dt> |
7fd9b7ecbcfe
Translator: added a translation engine for the IBM Watson Language Translator.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6018
diff
changeset
|
187 | <dd> |
7fd9b7ecbcfe
Translator: added a translation engine for the IBM Watson Language Translator.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6018
diff
changeset
|
188 | original language |
7fd9b7ecbcfe
Translator: added a translation engine for the IBM Watson Language Translator.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6018
diff
changeset
|
189 | </dd> |
7fd9b7ecbcfe
Translator: added a translation engine for the IBM Watson Language Translator.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6018
diff
changeset
|
190 | </dl><dl> |
7fd9b7ecbcfe
Translator: added a translation engine for the IBM Watson Language Translator.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6018
diff
changeset
|
191 | <dt>Returns:</dt> |
7fd9b7ecbcfe
Translator: added a translation engine for the IBM Watson Language Translator.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6018
diff
changeset
|
192 | <dd> |
7fd9b7ecbcfe
Translator: added a translation engine for the IBM Watson Language Translator.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6018
diff
changeset
|
193 | list of supported target languages for the given original |
7fd9b7ecbcfe
Translator: added a translation engine for the IBM Watson Language Translator.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6018
diff
changeset
|
194 | </dd> |
7fd9b7ecbcfe
Translator: added a translation engine for the IBM Watson Language Translator.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6018
diff
changeset
|
195 | </dl><dl> |
7fd9b7ecbcfe
Translator: added a translation engine for the IBM Watson Language Translator.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6018
diff
changeset
|
196 | <dt>Return Type:</dt> |
7fd9b7ecbcfe
Translator: added a translation engine for the IBM Watson Language Translator.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6018
diff
changeset
|
197 | <dd> |
7fd9b7ecbcfe
Translator: added a translation engine for the IBM Watson Language Translator.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6018
diff
changeset
|
198 | None, if function is not supported; list of str otherwise |
7fd9b7ecbcfe
Translator: added a translation engine for the IBM Watson Language Translator.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6018
diff
changeset
|
199 | </dd> |
6018
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
200 | </dl> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
201 | <div align="right"><a href="#top">Up</a></div> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
202 | <hr /> |
1c858879d3d0
Added the translator plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
203 | </body></html> |