-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathtest.py
More file actions
30 lines (23 loc) · 896 Bytes
/
test.py
File metadata and controls
30 lines (23 loc) · 896 Bytes
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
from timeit import timeit
import sentida as sd
SV = sd.Sentida()
Sentida().sentida("dårlig oplevelse")
print(SV.sentida("dårlig oplevelse"))
print(sd.sentida_examples)
setup = """
from sentida.sentida2 import Sentida2, sentida2_examples
SV = Sentida()
"""
time1 = []
time2 = []
iterations = 1000
for i in list(range(iterations)):
print("iteration: ", i)
time1.append(
timeit("SV.sentida(\"Jeg er rigtig glad. Jeg hader dig!!!!\", output = \"by_sentence_total\", speed = \"fast\")", setup = setup, number = 10))
time2.append(
timeit("SV.sentida(\"Jeg er rigtig glad. Jeg hader dig!!!!\", output = \"by_sentence_total\", speed = \"normal\")", setup = setup, number = 10))
print(sum(time1)/len(time1))
print(sum(time2)/len(time2))
SV = Sentida()
print(SV.sentida("Jeg er rigtig glad. Død.", output = "by_sentence_total", normal = True, speed = "fast"))