Open jdelange22 opened 6 months ago
Feel free to open a PR to fix this. It should be possible to implement this entirely in Vocup.Util.Evaluator
.
@daniel-lerch so you agree with me this needs fixing? Even though this is programmed to work the way it is right now right? I saw the evaluator so the fix is pretty simple. Will make a PR.
As you can see in the unit tests, I mostly had English verbs with (to) {verb}
in mind when designing this feature. The edge case upset (about sth)/(that)
in the unit test is a strange example. Users could enter that word as upset (about sth/that)
to get a proper optional expression evaluation.
Please go ahead fixing this.
Right now, an optional expression is only considered optional when there is a space before the first bracket (the first of the two parentheses). I sometimes find words that have this optional expression without a space before. Like "some(one)" for example. The part "(one)" in this example isn't considered optional.