Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider including original text in output for each parsed agent in recordedBy team #13

Open
nickynicolson opened this issue Nov 26, 2021 · 1 comment

Comments

@nickynicolson
Copy link

Input: Friis I., Getachew A., Rasmussen F. & Vollesen K.

Current output:

[{"family":"Friis","given":"I.","suffix":null,"particle":null,"dropping_particle":null,"nick":null,"appellation":null,"title":null}
,{"family":"Getachew","given":"A.","suffix":null,"particle":null,"dropping_particle":null,"nick":null,"appellation":null,"title":null}
,{"family":"Rasmussen","given":"F.","suffix":null,"particle":null,"dropping_particle":null,"nick":null,"appellation":null,"title":null}
,{"family":"Vollesen","given":"K.","suffix":null,"particle":null,"dropping_particle":null,"nick":null,"appellation":null,"title":null}]

Proposed: Add an extra property "original" to each agent entry in the list:

[{"family":"Friis","given":"I.","suffix":null,"particle":null,"dropping_particle":null,"nick":null,"appellation":null,"title":null,"original":"Friis I."},
{"family":"Getachew","given":"A.","suffix":null,"particle":null,"dropping_particle":null,"nick":null,"appellation":null,"title":null,"original":"Getachew A."}
,{"family":"Rasmussen","given":"F.","suffix":null,"particle":null,"dropping_particle":null,"nick":null,"appellation":null,"title":null,"original":"Rasmussen F."}
,{"family":"Vollesen","given":"K.","suffix":null,"particle":null,"dropping_particle":null,"nick":null,"appellation":null,"title":null, "original":"Vollesen K."}]

It would then be possible to surmise that this string consists of "agent, agent, agent & agent". Coupled with metadata hints about the source of the recordedBy data, this could help direct the parse strategy for more difficult examples.

@dshorthouse
Copy link
Member

Thanks @nickynicolson for the suggestion. In most cases, this would work but then there are cases like this:

Input: A. & B. Smith

Output:

[{"family":"Smith","given":"A.","suffix":null,"particle":null,"dropping_particle":null,"nick":null,"appellation":null,"title":null},{"family":"Smith","given":"B.","suffix":null,"particle":null,"dropping_particle":null,"nick":null,"appellation":null,"title":null}]

So, the original for the first item in the array is merely A.

I suppose this is acceptable, but I'll have to sort-out how to pass along the original bits to the output. Some of the bits are actually parsed whereas others flow through some regex routines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants