= commited on
Commit
5ba349a
·
1 Parent(s): d046325

cleaned syntax

Browse files
deep_translator/google_trans.py CHANGED
@@ -105,7 +105,3 @@ class GoogleTranslator(BaseTranslator):
105
  except Exception as e:
106
  raise e
107
 
108
-
109
- if __name__ == '__main__':
110
- res = GoogleTranslator(source="auto", target="de").translate(text='this is a good day')
111
- print(res)
 
105
  except Exception as e:
106
  raise e
107
 
 
 
 
 
deep_translator/linguee.py CHANGED
@@ -73,7 +73,3 @@ class LingueeTranslator(BaseTranslator):
73
  return translated_words
74
 
75
 
76
- if __name__ == '__main__':
77
- res = LingueeTranslator(source="en", target="de").translate(word='cute', return_all=False)
78
- print(res)
79
-
 
73
  return translated_words
74
 
75
 
 
 
 
 
deep_translator/mymemory.py CHANGED
@@ -80,7 +80,3 @@ class MyMemoryTranslator(BaseTranslator):
80
  except Exception as e:
81
  raise e
82
 
83
-
84
- if __name__ == '__main__':
85
- res = MyMemoryTranslator(source="en", target="zh").translate(text='cute')
86
- print(res)
 
80
  except Exception as e:
81
  raise e
82
 
 
 
 
 
deep_translator/pons.py CHANGED
@@ -85,15 +85,3 @@ class PonsTranslator(BaseTranslator):
85
  translated_words.append(self.translate(payload=word))
86
  return translated_words
87
 
88
-
89
- if __name__ == '__main__':
90
-
91
- # res = MyMemoryTranslator(source='auto', target='french').translate_text(path='../examples/test.txt')
92
- # res = MyMemoryTranslator(source='auto', target='french').translate_sentences([
93
- # "this is good",
94
- # "das Wetter ist schön",
95
- # "un verme verde in un bicchiere verde"
96
- # ])
97
- # res = PonsTranslator(source="en", target="ar").translate(text='good')
98
- res = PonsTranslator(source="en", target="ar").translate_words(words=('good', 'cute', 'angry'))
99
- print(res)
 
85
  translated_words.append(self.translate(payload=word))
86
  return translated_words
87