Batch editing participant IDs

Elnaz Kia ek325 at nau.edu
Thu Aug 12 00:17:49 UTC 2021


Dear Leonid,

I have one more question about my recent inquiry. Per Brian's and your
advice, I am in the process of changing the participant IDs and making
other necessary revisions. In order to change the transcriptions from form
A to form B (see below), I created the following commands. I couldn't find
a more dignified path. :-)

*Form A*
@Begin
@Languages: fra
@Participants: *F0001 *IDf0001 Student
@ID: fra|*corpus*|*F0001*|0;00.00|male|||Student||*|*
@Media: f0001c05ri4_1, audio
@Transcriber: Matteo Fiorini
@Comment: euh signals hesitation
@Situation: Introductions
**F0001*: je m' appelle (..) NAME NAME (.) euh (.) .
**F0001*: NAME c' est mon dernier nom [:: nom de famille] .
**F0001*: et ça vienne <de> [/] de Allemagne parce que mon maman <et> [/] et
mon papa est Allemagne [:: allemands] .
**F0001*: <et alors je> [//] euh (.) alors mon dernier nom
[:: nom de famille] NAME est Allemagne [:: allemand] .
@End

*Form B*
@Begin
@Languages: fra
@Participants: STU IDf0001 Student
@ID: fra|mussel|STU|0;00.00|male|||Student||IDf0001|
@Media: f0001c05ri4_1, audio
@Transcriber: Matteo Fiorini
@Comment: euh signals hesitation
@Situation: Introductions
*STU: je m' appelle (..) NAME NAME (.) euh (.) .
*STU: NAME c' est mon dernier nom [:: nom de famille] .
*STU: et ça vienne <de> [/] de Allemagne parce que mon maman <et> [/] et
mon papa est Allemagne [:: allemands] .
*STU: <et alors je> [//] euh (.) alors mon dernier nom
[:: nom de famille] NAME est Allemagne [:: allemand] .
@End

1. To change the participant ID in the main lines in chat & text files
(applies to all languages):

chstring +re +w +t* +l +s"\**:" "\*STU:" *.cha

ren +re -f *.chstr.cex *.cha



chstring +re +w +y +s"\**:" "\*STU:" *.txt

ren +re -f *.chstr.cex *.txt

2. To change the corpus name and the next field in line @ID in chat & text
files (applies to all languages):

chstring +re +w +t@ +s"|corpus|*|" "|mussel|STU|" *.cha

ren +re -f *.chstr.cex *.cha



chstring +re +w +y +s"|corpus|*|" "|mussel|STU|" *.txt

ren +re -f *.chstr.cex *.txt


3. To change the optional speaker name (last field) in line @ID

*Note: These commands has to be run separately for each folder, since the
ID changes in each folder.

chstring +re +w +t@ +s"|Student|||" "|Student||IDc0002|" *.cha

ren +re -f *.chstr.cex *.cha



chstring +re +w +y +s"|Student|||" "|Student||IDc0002|" *.txt

ren +re -f *.chstr.cex *.txt

4. To change the 1st field in line @Participant
*Note: These commands have to be run separately for each folder, since the
ID changes in each folder.
Tried this command and a few others, no chance!
chstring +w +d +s"F0010 IDf0010 Student" "STU IDf0010 Student" *.cha

*Questions:*
a) how can I achieve the last change (4)?
b) I am using batch to run the commands in 1 and 2 (highlighted in yellow).
Is it possible to create the search strings for 3 and 4 in a way that it is
not dependent on specific IDs so I could run all the commands in batch for
all the directories and subdirectories instead of running them on
individual folders?

I am so sorry for asking so many questions. I spend hours digging in the
manuals and playing with the commands before asking you. :-(

Thank you so much for your help!
Elnaz


Elnaz Kia, Ph.D. (she, her, hers)

*Post-Doctoral Research Associate
<https://l2trec.utah.edu/about/staff-directory.php>*

Second Language Teaching and Research Center (L2TReC)
<https://l2trec.utah.edu/>

University of Utah

LinkedIn
<https://www.linkedin.com/in/elnaz-kia?lipi=urn%3Ali%3Apage%3Ad_flagship3_profile_view_base_contact_details%3B%2FResGVF2SMGMAxhocdPnRw%3D%3D>

Personal Website <https://elnazkia.weebly.com/>

-- 
You received this message because you are subscribed to the Google Groups "chibolts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chibolts+unsubscribe at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/chibolts/CAOwOJY%3Df6JUMXRFvKkshZ609pnWUq1tNHRsQbX_VKm8q7WxNuw%40mail.gmail.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.linguistlist.org/pipermail/chibolts/attachments/20210811/13de2d56/attachment.htm>


More information about the Chibolts mailing list