IPS-LMU / emuR

The main R package for the EMU Speech Database Management System (EMU-SDMS)
http://ips-lmu.github.io/EMU.html
23 stars 15 forks source link

query() on SEGMENT annotations returns incorrect attribute #263

Closed trblslp closed 2 years ago

trblslp commented 2 years ago

Using the demo data, consider what happens when we make a new attribute definition for the 'Phonetic' level, which is the only level of type SEGMENT in the db.

add_attributeDefinition(ae,
                        levelName = "Phonetic",
                        name = "Phonetic2")

Now if we query all annotations on this new attribute, notice the values in the attribute column – they reflect the level name, not the attribute name.

query(ae,
      "Phonetic2 =~ .*")
Screen Shot 2022-06-16 at 4 59 54 pm

However, this behaviour does not occur when creating new attributes on ITEM levels:

add_attributeDefinition(ae,
                        levelName = "Word",
                        name = "Word2")
query(ae,
      "Word2 =~ .*")
Screen Shot 2022-06-16 at 5 03 53 pm

Any idea why?

An older question appears to be similar, but it reflects a much earlier stage of the package, where only a level variable was returned at all (i.e. no attribute variable).

raphywink commented 2 years ago

"Any idea why?" yes :-) -> prob. a bug in the query engine. That is not the expected behavior!

trblslp commented 2 years ago

Thanks for looking into this @raphywink !