writer / replaCy

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

allow succeeded by list, closes #16 #17

Closed sam-writer closed 4 years ago

sam-writer commented 4 years ago

This allows passing succeeded_by_phrase an arg that is a list.

Well, it felt weird to just do this for succeeded_by_phrase so now all the preceded/succeeded by match hooks support lists. Also fixed some typos while in there, and improved types.

There is some WET code in here... but I didn't want to spend time optimizing... Sorry 😬

sam-writer commented 4 years ago

NOTE: This has been released, v 0.12.0 https://pypi.org/project/replacy/0.12.0/

We can take it down if it doesn't pass CR

sam-writer commented 4 years ago

used here https://github.com/Qordobacode/service.plain.language/pull/88

sam-writer commented 4 years ago

@melisa-qordoba did you bring this code in some other way? I see this PR is open, but it showed up on my master branch...

melisa-writer commented 4 years ago

@melisa-qordoba did you bring this code in some other way? I see this PR is open, but it showed up on my master branch...

Yes. It was shipped here: https://github.com/Qordobacode/replaCy/commit/751d95a050a3a90488dc05312ea1687647525b5a

The story: introduced huge changes. Then saw your PR opened and ... conflicting. So merged both into one plus added more tests (which were left as todo).