-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
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
Nonempty Meaning #34
Comments
Great points! Just going to cross-reference issue #30 here for good measure. I think I'm convinced that One reason we might want to allow for empty meanings in general: e.g. for contradictory expressions like |
Yeah that's how the modals code works too, generate all meanings then remove the empty one. Feels like one might want to keep it around for clerical reasons, but not really to do anything with it. For now, the only error that results is if you try and access the prior for the empty meaning. Options: (1) return an empty collection, or (2) raise an Exception. |
I think #43 "solved" this after our discussion. In particular, we allow empty meanings to exist, but |
Right now Expression has default values for form and meaning, "" and the empty tuple, respectively.
But (at least) because Meaning requires a prior over referents, it expects a nonempty collection of referents. Of course it's easy to include this edge case do avoid div by 0, and maybe return an empty collection for the prior. But in practice, we don't ever consider emtpy meanings in effcomm experiments either.
We've already discussed making GrammaticalExpression not be a subclass of Expression; but highlights more fundamental choices: do we want to require a nonempty Meaning? Then, should we require a form and a meaning in Expression?
I lean towards being more restrictive, and requiring a form and nonempty meaning. But then, this will raise an error in grammar.py: in lines 217 and 272
https://github.com/CLMBRs/ultk/blob/main/src/ultk/language/grammar.py#L217
The text was updated successfully, but these errors were encountered: