thuiar / TEXTOIR

TEXTOIR is the first opensource toolkit for text open intent recognition. (ACL 2021)
https://github.com/thuiar/TEXTOIR
MIT License
185 stars 30 forks source link

Update bert_loader.py #54

Closed ChanChiChoi closed 5 months ago

ChanChiChoi commented 5 months ago

解决代码中赋值"oos"和文件中读取"oos" 不一致的情况 image

a1='oos' a2=open('onlyoos.txt','r').read().strip() # a2 也是oos a1 is not a2 #这句话返回True,py认为代码中赋值的'oos'字符串地址与文件中读取的不是同一条字符串,所以此处最好用 a1 != a2