-
Notifications
You must be signed in to change notification settings - Fork 186
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
'meta' data is lost when using '+' to concatenate corpus objects #2295
Comments
We have corpus meta fields to keep track of sources of the texts etc., so meta field should be kept only when the two objects have the same values. |
Thank you for the feedback. In this case maybe the 'Quick Start' documentation is misleading? "Corpus-level meta-data is also concatenated." I apologise if I have misunderstood - you seem to be saying that unless the meta data for 2 corpus objects have the same field/attribute names the new corpus object formed by '+' will not have the meta data from either of the source corpus objects? Thanks! |
It should probably just say: "docvars are combined". |
I have a working branch on this, but the unresolved policy question is what to do with metadata from two corpus objects that have the same "key". In other words, "title" and "title". Options are:
And what happens if two previous combined corpus object are then added together? |
I've hacked up a version of 3 for my particular case.
Still, I've been wrong before. And that's just this morning. |
In answer to the last question I would vote for:
|
Describe the bug
Corpus-level meta data assigned with meta is lost when 2 corpus objects are merged together with the '+' operator.
Reproducible code
Please paste minimal code that reproduces the bug. If possible, please upload the data file as
.rds
.Expected behavior
The separate meta data for each corpus should be merged e.g
print (meta(c3)) should give :
$a
[1] 1
$b
[1] 2
or similar.
## System information
Please run
sessionInfo()
and paste the output.Additional info
The 'Quick Start' states :
"Corpus-level meta-data is also concatenated."
The text was updated successfully, but these errors were encountered: