Open Harmon758 opened 1 year ago
Facing same issue, it's working is strange
That seems like invalid input to me. What would you expect when pluralizing a phrase?
@jaraco, I wouldn't expect it to break and could you please explain why it's is not raising the error in the first run and raising in the second run, there is no much difference in the input except spaces
could you please explain why it's is not raising the error in the first run and raising in the second run, there is no much difference in the input except spaces
I'm not familiar enough with the implementation to know what's expected here. I would need to trace the inputs through the code and try to infer what the code is trying to do. Harmon has determined that sometimes the length of the words being processed is a mismatch before and after postprocess. There may be a bug there, but I'm not confident that this use case should be supported at all.
I wouldn't expect it to break
I think I would expect it to break, if it can't provide a reasonable response. Perhaps there should be a check and if the input is something unexpected (like pipes or long phrases), it should just raise a ValueError early.
Regardless, this project is community-supported, so I'll leave this one for someone to investigate and propose a solution.
This might be considered invalid input, but
engine.plural
accepts multiple words. When doing so, it can raise an unexpectedIndexError
:This seems to be because
engine.postprocess
expects theinflected
it's passed to be the same number of words as theorig
it's passed, but that's not necessarily the case.