I brought the book with me, but if you don't know this classic writer's stories, you can read it here.
it is the story of Joan of Arc (or maybe Gandhi) retold in the future, where animal "undermen" are slaves and humans live in luxury.
Warning: It is a four handkerchief story.
The part about transferring a personality to a machine:
"What I mean is," said Elaine, "are you a person or are you a machine?" "Depends," said the voice. "I'm a machine, but I used to be a person, long, long ago. A lady, in fact, and one of the Instrumentality. But my time came and they said to me, 'Would you mind if we made a machine print of your whole personality? It would be very helpful for the informationbooths.' So of course I said yes, and they made this copy, and I died, and they shot my body into space with all the usual honors, but here I was. It felt pretty odd inside this contraption, me looking at things and talking to people and giving good advice and staying busy, until they built the new city. So what do you say? Am I me or aren't I?"