We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenAttack/metric/algorithms/modification.py 的 calc_score(self, tokenA : List[str], tokenB : List[str]) 函数中,当 tokenA 或者 tokenB 任意一个列表为空时,会触发ZeroDivisionError。
OpenAttack/metric/algorithms/modification.py
calc_score(self, tokenA : List[str], tokenB : List[str])
https://github.com/thunlp/OpenAttack/blob/4df712e0a5aebc03daa9b1ef353da4b7ea0a1b23/OpenAttack/metric/algorithms/modification.py#LL23C1-L43C29
calc_score([1,1], [1,2]) -> 0.5 calc_score([], [1,2]) -> ZeroDivisionError calc_score([1,2], []) -> ZeroDivisionError calc_score([], []) -> ZeroDivisionError
The text was updated successfully, but these errors were encountered:
No branches or pull requests
OpenAttack/metric/algorithms/modification.py
的calc_score(self, tokenA : List[str], tokenB : List[str])
函数中,当 tokenA 或者 tokenB 任意一个列表为空时,会触发ZeroDivisionError。https://github.com/thunlp/OpenAttack/blob/4df712e0a5aebc03daa9b1ef353da4b7ea0a1b23/OpenAttack/metric/algorithms/modification.py#LL23C1-L43C29
The text was updated successfully, but these errors were encountered: