refactor: remove useless if

This commit is contained in:
monoid 2022-02-14 22:23:35 +09:00
parent badedc3ab7
commit f8e7ed42b3
1 changed files with 2 additions and 2 deletions

View File

@ -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