-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
30 lines (24 loc) · 900 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import time
import long_s
from test_conversion_func import *
def main():
# prints out sample sentences for each language.
print("\n", end="")
sentences = [
("en", "The discussion was surprisingly insightful."),
("fr", "La discussion était étonnamment perspicace."),
("de", "Die Diskussion war überraschend aufschlussreich."),
("es", "La discusión fue sorprendentemente perspicaz."),
("it", "La discussione è stata sorprendentemente perspicace."),
]
for lang, sentence in sentences:
result = long_s.convert(sentence, lang=lang)
print(result)
# tests every supported language.
start_time = time.time()
print("\n", end="")
test_conversion_func(lang=None)
elapsed = time.time() - start_time
print(f"\n{elapsed:.2f} seconds")
if __name__ == "__main__":
main()