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

Cannot export secondary attributes of SEGMENT level to TextGrid collection #264

Open
trblslp opened this issue Jun 16, 2022 · 0 comments
Open

Comments

@trblslp
Copy link

trblslp commented Jun 16, 2022

Using the demo data, first make a new attribute for the Phonetic level, called Phonetic2, and copy the annotations from the former to the latter using the update_itemsInLevel() function.

# add attribute def
add_attributeDefinition(ae,
                        levelName = "Phonetic",
                        name = "Phonetic2")
# query orig level
phones <- query(ae,
      "Phonetic =~ .*")
# change attribute name
phones <- phones %>% 
  mutate(attribute = "Phonetic2")
# use resulting seglist to populate annotations on new attribute
update_itemsInLevel(ae,
                    phones)

We now have annotations for the new attribute:

query(ae,
      "Phonetic2 =~ .*")

Screen Shot 2022-06-16 at 5 24 41 pm

Then export as a TextGrid collection:

export_TextGridCollection(ae,
                          targetDir = "./Export_demo",
                          attributeDefinitionNames = c("Phonetic", "Phonetic2", "Word", "Accent"),
                          timeRefSegmentLevel = "Phonetic")

But, there are in fact no annotations at all on the TextGrid tier corresponding to the new attribute. Note that it doesn't seem to matter here whether we specify the timeRefSegmentLevel or not (although specifying it as the Phonetic2 level throws an error). However, we do find annotations for secondary tiers if they are of the ITEM type, as we can see for the Accent tier.

Screen Shot 2022-06-16 at 5 18 45 pm

I suspect this issue bears some relation to this other one, but I can't say why.

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