Update PxCorpus.py
Browse files- PxCorpus.py +4 -0
PxCorpus.py
CHANGED
|
@@ -60,6 +60,10 @@ class StringIndex:
|
|
| 60 |
|
| 61 |
def find(self, t):
|
| 62 |
key = (t[0], len(t))
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
if key not in self.vocab_struct:
|
| 64 |
return False
|
| 65 |
return t in self.vocab_struct[key]
|
|
|
|
| 60 |
|
| 61 |
def find(self, t):
|
| 62 |
key = (t[0], len(t))
|
| 63 |
+
if t == "milligrammes":
|
| 64 |
+
print("-"*50)
|
| 65 |
+
print(key)
|
| 66 |
+
print(key not in self.vocab_struct)
|
| 67 |
if key not in self.vocab_struct:
|
| 68 |
return False
|
| 69 |
return t in self.vocab_struct[key]
|