allenai / allennlp-semparse

A framework for building semantic parsers (including neural module networks) with AllenNLP, built by the authors of AllenNLP
Apache License 2.0
107 stars 24 forks source link

added test for production rules ... #29

Closed nitishgupta closed 3 years ago

nitishgupta commented 3 years ago

assuming function composition of the kind y = f(g(x))

matt-gardner commented 3 years ago

@pdasigi, FYI, you may be interested in this. If you want to look at it, feedback welcome, but no worries if not. @nitishgupta is going to separate the NLVR changes into a separate PR, so it's just the addition of function currying and function composition that are new here. You might start just by looking at the test differences, to see what's added, if you want to look at it.

The gist is that this adds two things that together give the flexibility of lambda functions, without having to deal with explicit lambda variables anywhere.

nitishgupta commented 3 years ago

I think the comments are helpful enough to explain the additions being made. I didn't go into the nitty-gritty of the code.