refactor: remove useless if
This commit is contained in:
parent
badedc3ab7
commit
f8e7ed42b3
@ -165,8 +165,7 @@ if __name__ == "__main__":
|
||||
def getTags(lst: List[Sentence]):
|
||||
for s in tqdm(lst):
|
||||
for e in s.detail:
|
||||
if not e in vocab:
|
||||
vocab.add(e)
|
||||
vocab.add(e)
|
||||
print("get tags from train...")
|
||||
getTags(train)
|
||||
print("get tags from dev...")
|
||||
@ -183,6 +182,7 @@ if __name__ == "__main__":
|
||||
v:str = "-".join(s)
|
||||
if not v in vocab:
|
||||
print("could not found pair " ,v)
|
||||
vocab.add(v)
|
||||
|
||||
tags = [{"name":"[PAD]","index":0}]
|
||||
i = 1
|
||||
|
Loading…
Reference in New Issue
Block a user