1212# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313# See the License for the specific language governing permissions and
1414# limitations under the License.
15- #
15+ #
1616
1717from .tika import ServerEndpoint , Translator , callServer , doTranslate1
1818
@@ -38,7 +38,7 @@ def from_buffer(string, srcLang, destLang, serverEndpoint=ServerEndpoint, reques
3838 :param serverEndpoint:
3939 :return:
4040 '''
41- status , response = callServer ('put' , ServerEndpoint , '/translate/all/' + Translator + '/' + srcLang + '/' + destLang ,
41+ status , response = callServer ('put' , ServerEndpoint , '/translate/all/' + Translator + '/' + srcLang + '/' + destLang ,
4242 string , {'Accept' : 'text/plain' }, False , requestOptions = requestOptions )
4343 return response
4444
@@ -51,7 +51,7 @@ def auto_from_file(filename, destLang, serverEndpoint=ServerEndpoint, requestOpt
5151 :return:
5252 '''
5353 jsonOutput = doTranslate1 (destLang , filename , serverEndpoint , requestOptions = requestOptions )
54- return jsonOutput [1 ]
54+ return jsonOutput [1 ]
5555
5656def auto_from_buffer (string , destLang , serverEndpoint = ServerEndpoint , requestOptions = {}):
5757 '''
@@ -61,7 +61,6 @@ def auto_from_buffer(string, destLang, serverEndpoint=ServerEndpoint, requestOpt
6161 :param serverEndpoint: Tika server end point (Optional)
6262 :return:
6363 '''
64- status , response = callServer ('put' , ServerEndpoint , '/translate/all/' + Translator + '/' + destLang ,
64+ status , response = callServer ('put' , ServerEndpoint , '/translate/all/' + Translator + '/' + destLang ,
6565 string , {'Accept' : 'text/plain' }, False , requestOptions = requestOptions )
6666 return response
67-
0 commit comments