OhadRubin / SmBop

MIT License
88 stars 35 forks source link

What is the purpose of the 2 lists "RULES_novalues" and "RULES_values" in node_util.py? could you please elaborate on its format and what do the 2 terms in each inner list denote #40

Closed ali6947 closed 3 years ago

OhadRubin commented 3 years ago

This is the definition of the grammar for Relational Algebra. These are rules of the CFG, of the form A->BC.

[
  [
    "And",
    [
      "And",
      "like"
    ]
  ],
  [
    "And",
    [
      "eq",
      "gt"
    ]
  ], ...

Take a look at _create_type_tensor at line 212 in models/smbop.py to see how it is used.