{"action":"opened","issue":{"url":"https://api.github.com/repos/IPS-LMU/emuR/issues/126","repository_url":"https://api.github.com/repos/IPS-LMU/emuR","labels_url":"https://api.github.com/repos/IPS-LMU/emuR/issues/126/labels{/name}","comments_url":"https://api.github.com/repos/IPS-LMU/emuR/issues/126/comments","events_url":"https://api.github.com/repos/IPS-LMU/emuR/issues/126/events","html_url":"https://github.com/IPS-LMU/emuR/issues/126","id":181959490,"number":126,"title":"autobuild_linkFromTimes() : bugs for writeToFS=F","user":{"login":"florianschiel","id":3428731,"avatar_url":"https://avatars.githubusercontent.com/u/3428731?v=3","gravatar_id":"","url":"https://api.github.com/users/florianschiel","html_url":"https://github.com/florianschiel","followers_url":"https://api.github.com/users/florianschiel/followers","following_url":"https://api.github.com/users/florianschiel/following{/other_user}","gists_url":"https://api.github.com/users/florianschiel/gists{/gist_id}","starred_url":"https://api.github.com/users/florianschiel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/florianschiel/subscriptions","organizations_url":"https://api.github.com/users/florianschiel/orgs","repos_url":"https://api.github.com/users/florianschiel/repos","events_url":"https://api.github.com/users/florianschiel/events{/privacy}","received_events_url":"https://api.github.com/users/florianschiel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-10T08:24:50Z","updated_at":"2016-10-10T08:24:50Z","closed_at":null,"body":"When setting the option writeToFS=F in autobuild_linkFromTimes() the function does not produce a consistent result.\r\nSee the following example:\r\n\r\n> convert_TextGridCollection(\"CONVTMP\",\"GlissandoNews\",\".\",verbose=T)\r\nINFO: Loading TextGridCollection containing 840 file pairs...\r\n  |======================================================================| 100%\r\n  INFO: Rewriting 840 _annot.json files to file system...\r\n  |======================================================================| 100%\r\n> gl.db = load_emuDB(\"GlissandoNews_emuDB\")\r\nINFO: Loading EMU database from GlissandoNews_emuDB... (840 bundles found)\r\n  |======================================================================| 100%\r\n> add_linkDefinition(gl.db,\"MANY_TO_MANY\",\"IntonationGroups\",\"IntonationalPhrase\")\r\n> autobuild_linkFromTimes(gl.db,\"IntonationGroups\",\"IntonationalPhrase\",convertSuperlevel=T,writeToFS=F)\r\n> add_linkDefinition(gl.db,\"MANY_TO_MANY\",\"IntonationalPhrase\",\"OrthographicTranscription\")\r\n> autobuild_linkFromTimes(gl.db,\"IntonationalPhrase\",\"OrthographicTranscription\",convertSuperlevel=T,writeToFS=F)\r\n> add_linkDefinition(gl.db,\"MANY_TO_MANY\",\"OrthographicTranscription\",\"Syllables\")\r\n> autobuild_linkFromTimes(gl.db,\"OrthographicTranscription\",\"Syllables\",convertSuperlevel=T,writeToFS=F)\r\n> add_linkDefinition(gl.db,\"MANY_TO_MANY\",\"Syllables\",\"PhoneticTranscription\")\r\n> autobuild_linkFromTimes(gl.db,\"Syllables\",\"PhoneticTranscription\",convertSuperlevel=T)\r\n  INFO: Rewriting 840 _annot.json files to file system...\r\n  |======================================================================| 100%> \r\n> \r\n> summary(gl.db)\r\nName:    GlissandoNews \r\nUUID:    ecfc8bbe-d794-4a37-8142-88705e5b6af2 \r\nDirectory:       /vdata/BAS/GLISSANDO/GlissandoNews_emuDB \r\nSession count: 24 \r\nBundle count: 840 \r\nAnnotation item count:  1687938 \r\nLabel count:  1687938 \r\nLink count:  1112553 \r\n\r\nDatabase configuration:\r\n\r\nSSFF track definitions:\r\nNULL\r\n\r\nLevel definitions:\r\n                       name    type nrOfAttrDefs               attrDefNames\r\n1 OrthographicTranscription SEGMENT            1 OrthographicTranscription;\r\n2     PhoneticTranscription SEGMENT            1     PhoneticTranscription;\r\n3                 Syllables    ITEM            1                 Syllables;\r\n4        IntonationalPhrase SEGMENT            1        IntonationalPhrase;\r\n5          IntonationGroups SEGMENT            1          IntonationGroups;\r\n6 Syllables-autobuildBackup SEGMENT            1 Syllables-autobuildBackup;\r\n\r\nLink definitions:\r\n          type            superlevelName              sublevelName\r\n1 MANY_TO_MANY          IntonationGroups        IntonationalPhrase\r\n2 MANY_TO_MANY        IntonationalPhrase OrthographicTranscription\r\n3 MANY_TO_MANY OrthographicTranscription                 Syllables\r\n4 MANY_TO_MANY                 Syllables     PhoneticTranscription\r\n---------------------------------------------------\r\nOnly the last autobuild worked as expected: the level Syllables was transformed into type ITEM and a backup level was created. All the other levels (where autobuild was used with writeToFS=F) are still of type SEGMENT and no backup level was created. At least that is what the function wrote into the DBConfig file and shows in summary(). \r\nIn fact the *_annot.json files in the FS contain partly correct output: all levels except PhoneticTranscription were transformed in to type ITEM and all the links have been set correctly. However, only the level Syllables has been copied before transformation into a backup level.\r\nSo, there are basically two problems when using writeToFS=F :\r\n1. No Backup level is written into the FS, but the Superlevel is transformed into type ITEM.\r\n2. The DBConfig defines the Superlevel still as SEGMENT although it has been transformed to ITEM in the FS.\r\n\r\n"}}
{"actor":{"display_login":"florianschiel"}}