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

create_itemsInLevel is does not work for segments with multiple attributes #266

Open
FredrikKarlssonSpeech opened this issue Oct 20, 2022 · 0 comments

Comments

@FredrikKarlssonSpeech
Copy link

There are some issues with create_itemsInLevel, and one of them is that if you have a SEGMENT level with multiple attributes, than you cannot add labels to them.

marks
# A tibble: 8 × 8
  session name               row start_item_seq_idx labels level attribute start
  <chr>   <chr>            <dbl>              <dbl> <chr>  <chr> <chr>     <dbl>
1 0000    dâlem_iso_1_mis      1                  1 1      EGG   EGG       0.002
2 0000    dâlem_iso_1_mis      1                  1 1      EGG   two       0.002
3 0000    dhâlem_iso_1_mis     1                  1 1      EGG   EGG       0.002
4 0000    dhâlem_iso_1_mis     1                  1 1      EGG   two       0.002
5 0000    talam_iso_1_mis      1                  1 1      EGG   EGG       0.002
6 0000    talam_iso_1_mis      1                  1 1      EGG   two       0.002
7 0000    talam_sen_1_mis      1                  1 1      EGG   EGG       0.002
8 0000    talam_sen_1_mis      1                  1 1      EGG   two       0.002
> edf %>% full_join(te) -> marks
Joining, by = "row"
> edf %>% full_join(te) %>% rename(bundle = name) -> marks
Joining, by = "row"
> marks
# A tibble: 8 × 8
  session bundle             row start_item_seq_idx labels level attribute start
  <chr>   <chr>            <dbl>              <dbl> <chr>  <chr> <chr>     <dbl>
1 0000    dâlem_iso_1_mis      1                  1 1      EGG   EGG       0.002
2 0000    dâlem_iso_1_mis      1                  1 1      EGG   two       0.002
3 0000    dhâlem_iso_1_mis     1                  1 1      EGG   EGG       0.002
4 0000    dhâlem_iso_1_mis     1                  1 1      EGG   two       0.002
5 0000    talam_iso_1_mis      1                  1 1      EGG   EGG       0.002
6 0000    talam_iso_1_mis      1                  1 1      EGG   two       0.002
7 0000    talam_sen_1_mis      1                  1 1      EGG   EGG       0.002
8 0000    talam_sen_1_mis      1                  1 1      EGG   two       0.002
> list_levelDefinitions(egg)
  name    type nrOfAttrDefs attrDefNames
1  EGG SEGMENT            1         EGG;
> add_attributeDefinition(egg,levelName = "EGG",name = "two")
  INFO: Rewriting 4 _annot.json files to file system...
  |===============================================================================================================================================================================================================| 100%
> create_itemsInLevel(egg,itemsToCreate = marks)
Error in create_itemsInLevel(egg, itemsToCreate = marks) : 
  Found duplicate sample_start values on same level

The documentation could need some looking over too, but duplicate start ids is kind of the point when you are assigning multiple level attributes, so this needs fixing (and clarification with clear examples).

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

1 participant