writer / replaCy

spaCy match and replace, maintaining conjugation
https://pypi.org/project/replacy/
MIT License
34 stars 8 forks source link

match hook `relative_x_is_y` should support optional 4th parameter, `text` #43

Closed sam-writer closed 4 years ago

sam-writer commented 4 years ago

Need to write the following

        "match_hook": [
            {
                "name": "relative_x_is_y",
                "args": [
                    "children",
                    "dep",
                    "advmod",
                    "together"
                ],
                "match_if_predicate_is": true
            }
        ]
sam-writer commented 4 years ago

Damn... you know how

image

Well, relative_x_is_y is shitty, partial-reimplementation of spaCy's DependencyMatcher... but that ISN'T DOCUMENTED, so if you want to understand it, you have to read the test suite. So, eventually I guess we want to replace this match hook with dependency matcher... maybe