writer / replaCy

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

Point of View Shifting #87

Open pooki3bear opened 4 years ago

pooki3bear commented 4 years ago

Hi,

From the readme docs it seems clear that verb substitution with presented view is preserved. Is it possible to take an input text, and alter point of view? E.G. Book chapter is presented in 3rd person PoV -> replaCy -> book chapter rendered in 1st person PoV. If this is achievable with the present work, please give me a general list of instructions to accomplish if possible.

sam-writer commented 4 years ago

This may be possible, depending on scope. Do you have a few example sentences?

pooki3bear commented 3 years ago

Hi, something like this:

3p"He walked into the room" > 1p "I walked into the room" 3p"The man walked into the room" > 1p "I walked into the room"

sam-writer commented 3 years ago

this is doable, but to get long-range dependencies right is not easy. What I mean is the following is easy:

The man runs to the store -> I run to the store

but with an arbitrary number of tokens in between becomes hard:

The man, who is thinking about all the work he has to do, runs to the store -> I, who am thinking about all the work I have to do, run to the store

Also, what about cases like

The man, who was thinking about his wife and her love of life and beautiful face, was content.

Does that become: I, who was thinking about my wife and my love of life and beautiful face, was content.?

It not, how is this process supposed to distinguish between 3rd persons to becomes 1st and 3rd persons that are to remain unchanged?