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

export_textGridCollection() does not recognize the timeRefSegmentLevel query parameter #227

Closed kirbyj closed 4 years ago

kirbyj commented 4 years ago

Imagine you have an emuDB where an ITEM level is linked to multiple SEGMENT levels (see e.g. #226):

> export_TextGridCollection(ae, "~/Desktop/tge")
Querying all annotation items... (this may take a while!)
Error in convert_queryResultToEmuRsegs(emuDBhandle, timeRefSegmentLevel,  : 
  Segment time information derivation for level 'Utterance' is ambiguous:
The level is linked to multiple segment levels: Phonetic, MAS
Please select one of these levels using the 'timeRefSegmentLevel' query parameter.

Could export_textGridCollection be modified to recognize the timeRefSegmentLevel query parameter, so that emuDBs with this kind of structure could be exported?

(Or maybe the answer is "no, this is precisely the kind of structure we want to discourage")

raphywink commented 4 years ago

Just implemented it. Would you mind trying it out and seeing if that is what you are after? It doesn't work in all cases (i.e. multi-dim hierarchies) but could be useful in certain cases like yours.

kirbyj commented 4 years ago

  System command error, exit status: 1, stdout + stderr (last 10 lines):
E> ** R
E> Error in parse(outFile) : 
E>   /private/var/folders/v_/9999w1yd38q810779m70q7340000gn/T/RtmpvkoR2i/Rbuild499367dca763/emuR/R/emuR-export_TextGridCollection.:54:39: unexpected symbol
E> 53:                                       timeRefSegmentLevel = NULL
E> 54:                                       verbose
E>                                           ^
E> ERROR: unable to collate and parse R files for package ‘emuR’
E> * removing ‘/private/var/folders/v_/9999w1yd38q810779m70q7340000gn/T/RtmpvkoR2i/Rinst4993477189da/emuR’
E>       -----------------------------------
E> ERROR: package installation failed```
raphywink commented 4 years ago

facepalm... sorry! See 039cf99326c44f87e366f46280525817a1c5c0ef

kirbyj commented 4 years ago

seems to do the trick! 👍