Loading CHANGELOG.md +4 −0 Original line number Diff line number Diff line # Change log of GraphDot ## 0.8a14 (2021-03-09) - Minor tweaks to look-ahead rewriter logic. ## 0.8a13 (2021-03-08) - A new and experimental calling convention to allow evaluations of the Loading graphdot/__init__.py +1 −1 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ from .graph import Graph __all__ = ['Graph'] __version__ = '0.8a13' __version__ = '0.8a14' __author__ = '''Yu-Hang "Maxin" Tang, Oguz Selvitopi, Chi-Feng Wang, Thomas H. Li''' __maintainer__ = 'Yu-Hang "Maxin" Tang' Loading graphdot/model/tree_search/_rewriter.py +8 −7 Original line number Diff line number Diff line Loading @@ -142,11 +142,12 @@ class LookAheadSequenceRewriter(AbstractRewriter): @staticmethod def _match_context(tree, s, k, n): ptrs = [tree[tree.root] for _ in range(n + 1)] for i in range(max(k - n, 0), k): for i, loc in enumerate(range(max(k - n, 0), k)): for j, p in enumerate(ptrs[:i + 1]): if p is not None: try: next, = [c for c in tree.children(p.identifier) if c.tag == s[i]] if c.tag == s[loc]] except (KeyError, ValueError): next = None ptrs[j] = next Loading Loading
CHANGELOG.md +4 −0 Original line number Diff line number Diff line # Change log of GraphDot ## 0.8a14 (2021-03-09) - Minor tweaks to look-ahead rewriter logic. ## 0.8a13 (2021-03-08) - A new and experimental calling convention to allow evaluations of the Loading
graphdot/__init__.py +1 −1 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ from .graph import Graph __all__ = ['Graph'] __version__ = '0.8a13' __version__ = '0.8a14' __author__ = '''Yu-Hang "Maxin" Tang, Oguz Selvitopi, Chi-Feng Wang, Thomas H. Li''' __maintainer__ = 'Yu-Hang "Maxin" Tang' Loading
graphdot/model/tree_search/_rewriter.py +8 −7 Original line number Diff line number Diff line Loading @@ -142,11 +142,12 @@ class LookAheadSequenceRewriter(AbstractRewriter): @staticmethod def _match_context(tree, s, k, n): ptrs = [tree[tree.root] for _ in range(n + 1)] for i in range(max(k - n, 0), k): for i, loc in enumerate(range(max(k - n, 0), k)): for j, p in enumerate(ptrs[:i + 1]): if p is not None: try: next, = [c for c in tree.children(p.identifier) if c.tag == s[i]] if c.tag == s[loc]] except (KeyError, ValueError): next = None ptrs[j] = next Loading