penman icon indicating copy to clipboard operation
penman copied to clipboard

General-purpose graph rewriting

Open goodmami opened this issue 8 years ago • 1 comments

A useful feature would be to modify a corpus of graphs according to some patterns. (see also #2)

  • prune leaf node or edge (e.g., prune udef_q, prune :polarity)
  • prune branch (if any reentrancies are self-contained)
  • treeify (sever reentrancies on serialization)
  • prune branch and sever reentrancies
  • replace node type or relation (sub def_q existential_q, sub :-EQ :MOD-EQ)
  • insert relation and node (insert (a / *_n_* !:RSTR-H-of *) (a :RSTR-H-of (b / udef_q)))

goodmami avatar Feb 14 '17 21:02 goodmami

Renaming this as some transformations are already implemented in the penman.transform module, but not to the extent that this issue describes.

goodmami avatar Nov 15 '19 04:11 goodmami

Closing this as I won't be working on it, and it may be best as a separate utility.

goodmami avatar Nov 21 '23 04:11 goodmami