Creating dependent tiers

27 views
Skip to first unread message

Remei González Manzanero

unread,
Nov 10, 2019, 8:13:25 AM11/10/19
to chibolts

Hello,


I am trying to find a command to automate the process of creating dependent tiers in all the CHAT files and typing some codes in them (according to some easy Boolean rules).

So far I tried to do it using the COMBO command (by creating a .cut file), but I think I did not do it right. Is there any specific command to create dependent tiers after every transcription line?


Thanks in advance, 




Brian MacWhinney

unread,
Nov 10, 2019, 12:54:53 PM11/10/19
to ChiBolts, Remei González Manzanero
Remel (I guess that is your name, although you didn’t sign your email).,

I assume that you are talking about inserting a blank dependent tier. I guess you are somehow just trying to save the word of typing something like %cod: Can’t you just use cut-and-paste for this? It might be that what you are trying to do is close to what is done in Coder’s Editor.

It is also possible to use the CLAN find-replace function to replace the asterisk that begins a main line with %cod:<tab><CR>*
That will work. I tried it.

-- Brian MacWhinney
Teresa Heinz Professor of Cognitive Psychology,
Computational Linguistics,
and Modern Languages, CMU
> --
> 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+u...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/chibolts/505697df-abb2-4991-8e3b-df3fd56c6c4f%40googlegroups.com.

Remei González Manzanero

unread,
Nov 13, 2019, 12:18:50 PM11/13/19
to chibolts

Hello, 

Thank you for your fast answer. Yes, my name is Remei (I thought the signature was authomatically written in the message, sorry). 

The find-replace function worked well, thank you. So far, I've been copy-pasting "%cod:   " in every line in every file, but I was trying to find a way to do it in all the files at once. I was trying it also in Coder mode, but I couldn't find a way either. I'm also interested in replacing some expressions for other ones in transcription lines. For instance, let's say I wrote "as far as" and I want to write "as_far_as" all together to be counted as one word instead of three. Is there any way or command to replace all of them at once?

Thank you very much in advance for your help, 


Remei 

Brian MacWhinney

unread,
Nov 13, 2019, 2:46:53 PM11/13/19
to ChiBolts, Remei González Manzanero
Remei,
For doing string replacements across many files at once, I strongly recommend use of either BBEdit on OSX or SublimeText on Windows. These are programmers’ editors that allow you to specify regular expressions that can rapidly replace strings across large collections of files. The replacement functions in CLAN are more limited and are designed for use in single files.

Best,

-- Brian MacWhinney
Teresa Heinz Professor of Cognitive Psychology,
Computational Linguistics,
and Modern Languages, CMU

> --
> 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+u...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/chibolts/5003f275-38f9-4b67-9b37-ea24f0dea597%40googlegroups.com.

Leonid Spektor

unread,
Nov 13, 2019, 3:59:05 PM11/13/19
to chib...@googlegroups.com
Remei,

There is a command in CLAN that can do what you want. It had a problem with inserting new code lines, but it is fixed now. New CLAN is on the web. Below are 2 commands that you can use. CHSTRING will replace original files, so you might want to backup original files/folder before you run those commands

1. To insert new code "%aaa" run command:

chstring +s"\**" "\**%aaa:\t\n" -w +1 *.cha

2. To change strings like "as far as" to "as_far_as" run command:

chstring -cchstring_word.cut -w +1 *.cha

The string replacement "as far as" is store in file chstring_word.cut that is attached to this email. You can add more string to that file and run CHSTRING to replace those strings with just one command in point 2.


Leonid.
chstring_word.cut

Remei González Manzanero

unread,
Nov 14, 2019, 5:25:50 AM11/14/19
to chibolts

Hello,

I'll go with the CHSTRING command this time, is perfect, it worked, and for future more complex cases I'll go with SublimeText or simmilars. 

Thank you very much, 


Remei

Remei González Manzanero

unread,
Nov 25, 2019, 6:56:43 AM11/25/19
to chib...@googlegroups.com

Hello again,

Sorry for opening again this topic. The second chstring command worked perfectly, but I tried again the 1rst. one chstring +s"\**" "\**%aaa:\t\n" -w +1 *.cha and it didn’t give me the output I was looking for. It gave me:

\namesubject:          sentence .

*%aaa:

 

That it, it introduces a \ before the participants’ name, it supresses the * and writes the * before the name of the dependent tier.

 

I’ve been trying to execute the command chstring in CLAN, looking for the most suitable regular expression to be replaced. I searched the expression “period followed by an endline” to replace it for that same one plus %aaa, that is,  .\n, and I wanted to replace it for .\n%aaa, executing the next command:

chstring +s".\n" ".\n%aaa –w +1

But it doesn’t replace it. I believe that the search function in CLAN can’t search the endline using \n, although it works when that is what’s replaced. Is that so?

The easiest solution I found is doing the replacement using an editor, but I am really curious about it and I wanted to ask if that’s the case.

On the other side, using the editor to do the replacements, it also happened that * before the participant’s name was erased, so for some reason I had to replace it for the same expression  + the dependent’s tier + an asterisk at the end because this one was erased.

 Thank you in advance and thank you for your help.

Regards,

 

---
Remei González Manzanero
 remeig...@gmail.com 

PhD Student

Universitat de Barcelona
  


--
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+u...@googlegroups.com.

Leonid Spektor

unread,
Nov 25, 2019, 11:30:49 AM11/25/19
to chib...@googlegroups.com
Remei,

The command that you are using only works with newer version of CLAN. There was a problem with CLAN before which cause the effect that you are describing. I had fixed CLAN and the one time that you say the command worked for you must be when you used that newer version of CLAN. Please make sure that you are using the latest version of CLAN.


Leonid.

Remei González Manzanero

unread,
Dec 2, 2019, 7:18:11 AM12/2/19
to chib...@googlegroups.com
Dear Leonid, 

Thank you for the fast response. As you said, I updated CLAN again and it worked. So, perfect and thank you very much. 
And regarding to the other question, I can't do replacements of endlines, but maybe I didn't find the proper expression to be written in the command. In any case, I found different ways to do it. 

Thank you for your time. It's been very useful. 

Best regards, 

---
Remei González Manzanero
 remeig...@gmail.com 
  


Reply all
Reply to author
Forward
0 new messages