Update PxCorpus.py
Browse files- PxCorpus.py +3 -2
PxCorpus.py
CHANGED
@@ -57,7 +57,7 @@ class StringIndex:
|
|
57 |
print(key in self.vocab_struct)
|
58 |
exit(0)
|
59 |
|
60 |
-
if key in self.vocab_struct == False:
|
61 |
self.vocab_struct[key] = []
|
62 |
|
63 |
self.vocab_struct[key].append(t)
|
@@ -73,8 +73,9 @@ class StringIndex:
|
|
73 |
print(key)
|
74 |
print(key in self.vocab_struct)
|
75 |
|
76 |
-
if key in self.vocab_struct == False:
|
77 |
return False
|
|
|
78 |
return t in self.vocab_struct[key]
|
79 |
|
80 |
_VOCAB = StringIndex(vocab=open("./vocabulary_nachos_lowercased.txt","r").read().split("\n"))
|
|
|
57 |
print(key in self.vocab_struct)
|
58 |
exit(0)
|
59 |
|
60 |
+
if (key in self.vocab_struct) == False:
|
61 |
self.vocab_struct[key] = []
|
62 |
|
63 |
self.vocab_struct[key].append(t)
|
|
|
73 |
print(key)
|
74 |
print(key in self.vocab_struct)
|
75 |
|
76 |
+
if (key in self.vocab_struct) == False:
|
77 |
return False
|
78 |
+
|
79 |
return t in self.vocab_struct[key]
|
80 |
|
81 |
_VOCAB = StringIndex(vocab=open("./vocabulary_nachos_lowercased.txt","r").read().split("\n"))
|