Clan to Datavyu (more like data... whew!)

This process can only be completed on the computer called Lily (one of the PCs). So, hop on over there and continue!

  1. Open the README.md and task2_1.rb IN ATOM. The README includes information for typical problems that arise. 2_1 needs to be directly edited for each file. there is also a 2_2 task, but that can run automatically.

    1. Important note about atom: Always make sure that you save the file after you edit it. If the file is not saved, there will be a small blue dot to the right of the tab of the script you have open.

  2. Change the file path in task2_1.rb line 8 to the file path of the .cha file that you want to convert. Generally, you only have to change the following four things. Everything else should be the same if you're working on lily.

    1. z: or y:

    2. NH or HL

    3. month number

    4. specific file name

  3. SAVE THE NEW SCRIPT. You don't need to "save as" anything, you can save over the old script.

  4. Open a new project in Datavyu and name it after the file that you are transferring followed by your initials. For instance, if you are editing 01MD_13.cha, you would call the project 01MD_13_ND.

    1. Save this file under the correct month in the data_tree.

  5. Now you have to run the script. In datavyu, click on [Script]->[Run Script]-> Select task2_1.rb from the cha_to_datavyu_scripts folder. Run this script.

  6. OH MY GOSH IT POPPED UP WITH AN ERROR!!!! Yup. That will happen 9 times out of 10. Here are common errors and how to fix them (in order of how often they come up):

    1. If it says that there is 'No such file or directory," you spelled something wrong in the script in Atom. Check the spelling and try running the script again.

    2. CLAN doesn't like to have long lines, so it wraps the script. The problem is, ruby doesn't like it when there are different lines containing one "line" of information. So, you have to make sure that all of the data is included on one line. Only problem is, you can't do that in CLAN, so you have to do that in Atom.

      1. Open the .cha file in question in Atom (if you're editing 01MD_13.cha, right click on that file and click "Open in Atom").

      2. Search for the transcription line that caused the error. It should show up directly under *****SCRIPT ERROR ***** on the script run box in datavyu.

      3. Put all of the data onto one line (delete the extra space). Most times, lines will just run over onto 2 lines, but sometimes, you might find 3 or even 4 lines of one utterance.

      4. Once that line is fixed, save the data in Atom, and run the script again. Keep the file open in Atom until you are sure that there are no more errors. If everything worked, go to step 6. If not, go back to step 5. If that wasn't the problem, to the next step.

    3. The original coders of the data also sometimes forgot to put in timestamps. The script really doesn't like that.

      1. If you search for the line that caused the error and there isn't an overflow, it may have something to do with the timestamp.

      2. Copy the timestamp of the previous utterance and paste it on the problem line.

      3. This may seem like a cheap way to get around the problem, but the timestamps can always be adjusted in datavyu.

      4. Sometimes, the  symbol before and after the timestamp may just be missing. Make sure that those both exist.

    4. Sometimes, the script just freaks out. If that happens and neither of the previous two things solved the problem, literally just rerun the script without changing anything. Or, add a space at some random point in the .cha file and then delete it again. 90% of the time, this will fix the problem.

  7. Awesome, so now there should be a column called chafile_info in the Datavyu viewer! Run the next script: [Script] -> [Run Script] -> Select task2_2.rb.

    1. This will very infrequently cause problems. If it does, try running it again. It will fix the problem by itself.

  8. Great, now there's a column in Datavyu called nouns! You're done with this part. Save the .opf file and move onto the next step!

Last updated