qanastek commited on
Commit
b9cdf5d
·
1 Parent(s): 9e8b187

Update PxCorpus.py

Browse files
Files changed (1) hide show
  1. PxCorpus.py +2 -2
PxCorpus.py CHANGED
@@ -74,9 +74,9 @@ class StringIndex:
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"))
82
 
 
74
  print(key in self.vocab_struct)
75
 
76
  if (key in self.vocab_struct) == False:
77
+ return "is_oov"
78
 
79
+ return "is_not_oov" if t in self.vocab_struct[key] else "is_oov"
80
 
81
  _VOCAB = StringIndex(vocab=open("./vocabulary_nachos_lowercased.txt","r").read().split("\n"))
82