Replacements in dependent tiers

remeig...@gmail.com remeigonzalez at gmail.com
Thu Jan 27 18:24:02 UTC 2022


Dear Leonid, 
Fantastic. Thank you very much for all your assistance. It really helped. 
Thank you and best regards, 


El miércoles, 26 de enero de 2022 a las 2:59:02 UTC+1, Leonid Spektor 
escribió:

> The strings that are matched by wild characters, like * and _, are not 
> changed and are copied to the output. The best way to see what commands do 
> is to try them on a small customized sample file. In regard to except 
> words, there is no feature to do that. Except, do not include that word in 
> search string and then search string will not match the word you want to 
> exclude. CHSTRING allows to specify a file with different search and 
> replace entries, so you can specify as many of those as you want. This will 
> allow you to very specifically customize what word or part of string you 
> want to match and which you want to exclude.
>
>
> Leonid. 
>
> On Jan 25, 2022, at 16:27, remeig... at gmail.com <remeig... at gmail.com> 
> wrote:
>
> Good day, 
> Thank you very much for the fast reply. I really appreciate your help. 
>
> Now I understand what the +1 is for, I saw it in other commands used by 
> other people but I didn't understand it. 
>
> Regarding to the specific command "chstring +t%dep +s"$code-1*" 
> "$new-code*"", using the * would keep with no changes all the words 
> contained in that *? So would this mean that I can replace specific parts 
> of the old codes using this specific command? 
>
> Another question that just came to me now is that: is there any way to use 
> exceptions in the codes, such as changing a code that contains specific 
> words except for one word? I'm not sure if I'm expressing myself right. 
>
> Example: chstring +t%dep +s"$code-*want-to-change-EXCEPT 
> 'SPECIFIC-WORD-I-DON'T-WANT-TO-CHANGE" "$new-code"
>
> Thank you for offering giving the exact command lines. I believe for now 
> it is okay, I will practice with the command before and I will let you know 
> in the case we need more help. 
>
> Best regards, 
> --
> Remei González Manzanero
>
> El lunes, 24 de enero de 2022 a las 0:01:48 UTC+1, Leonid Spektor escribió:
>
>> Hi,
>>
>> I will start with last question. The reason CHSTRING command outputs 
>> ".chstr.cex" filenames is so that you can check the output to see if 
>> changes were done correctly and nothing went wrong. If you really want to 
>> take a chance then add +1 option to the command line. Otherwise, after you 
>> verify that only right string were replaced correctly you can use command 
>> "ren -f *.chstr.cex *.cha" to change all output filenames to .cha.
>>
>> For the first question CHSTRING command works on word bases by default. 
>> This means that the string that you want to replace has to completely match 
>> the code in the data file. For example, if you have codes 
>> "$code-1want-to-change" and "$code-2want-to-change", then following 
>> commands will replace only code "$code-1want-to-change":
>>
>> chstring +t%dep +s"$code-1want-to-change" "$new-code"
>> chstring +t%dep +s"$code-1*" "$new-code*"
>>
>> Please notice the "+t%dep" option. It will guarantee that only codes 
>> found on %dep tier will be replace. The same string on other tiers will not 
>> be changed.
>>
>> If you want a more detailed example, then you can email your sample file 
>> to me directly along with a list of codes you want to replace and I will 
>> give you the exact command line(s).
>>
>>
>> Leonid. 
>>
>> On Jan 23, 2022, at 15:06, remeig... at gmail.com <remeig... at gmail.com> 
>> wrote:
>>
>> Dear all, 
>>
>> We are trying to find a way *to replace several codes* we used in a 
>> dependent tier in many files, in order to create new files with these new 
>> codes. 
>>
>> As far as I know, the CHSTRING command with a *.cut *file containing a 
>> list of all the replacements can be used for this purpose, but I’m afraid 
>> of going wrong and replacing strings that we are not supposed to, specially 
>> in the case of complex codes containing characters like : or – (although I 
>> believe they’re not considered metacharacters in this case). 
>>
>> I would go with something like: 
>>
>> CHSTRING %dep “$code-Iwant-to-change” “resulting-code”.
>>
>> Is there any other way to do it or is there any unique option I should 
>> use in the case of using CHSTRING in dependent tiers? 
>>
>> Furthermore, I noticed the next: when using CHSTRING command it gives me 
>> back as an output a .chstr.cex file format. Is there any way to avoid this? 
>>
>> Thank you in advance,
>>
>> --
>>
>> Remei González Manzanero 
>>
>> -- 
>> 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... at googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/chibolts/303df79e-aed9-4a00-899a-735f85d62ccfn%40googlegroups.com 
>> <https://groups.google.com/d/msgid/chibolts/303df79e-aed9-4a00-899a-735f85d62ccfn%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>>
>>
> -- 
> 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... at googlegroups.com.
>
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/chibolts/d5f20104-033c-4d60-83b9-655673ba91e0n%40googlegroups.com 
> <https://groups.google.com/d/msgid/chibolts/d5f20104-033c-4d60-83b9-655673ba91e0n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
>

-- 
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/bef39d37-ae49-422d-adc8-429cb8a5a44en%40googlegroups.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.linguistlist.org/pipermail/chibolts/attachments/20220127/a9f4fa70/attachment.htm>


More information about the Chibolts mailing list