-
Notifications
You must be signed in to change notification settings - Fork 0
/
testbed.py
55 lines (41 loc) · 1.09 KB
/
testbed.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
sent_len=6
class Word():
def __init__(self):
self.word='sampleWord'
self.pos='samplePOS'
sent=[]
for x in range(0,6):
new_word=Word()
sent.append(new_word)
for word in sent:
print(word)
ok_lst=['c,a,r,s','b,o,a,t']
word1="a,r"
if any(word1 in s for s in ok_lst): #word1 in enumerate(ok_lst):
print "OK"
else:
print "NO"
for i, item in enumerate(wordWOPOS):
if i%2 ==0:
entry="("+item+")"
contextWoParens.extend(entry)
else:
contextWoParens.extend(item)
# class Rocket():
# # Rocket simulates a rocket ship for a game,
# # or a physics simulation.
# def __init__(self):
# # Each rocket has an (x,y) position.
# self.x = 0
# self.y = 0
# def move_up(self):
# # Increment the y-position of the rocket.
# self.y += 1
# # Create a fleet of 5 rockets, and store them in a list.
# my_rockets = []
# for x in range(0,5):
# new_rocket = Rocket()
# my_rockets.append(new_rocket)
# # Show that each rocket is a separate object.
# for rocket in my_rockets:
# print(rocket)