chstring

Leonid Spektor spektor at andrew.cmu.edu
Thu Mar 18 18:07:41 UTC 2004


Anna and et al,

    "chstring" is designed to search for the whole word. That's why in your
example:

    *ANN: c'è tanto di più di questa # närhet at s.

command:

    chstring +s"@s " "@sv "

failed.

One solution is to use the following command:

    chstring +s"@s " "@sv " +w

The "+w" option tell "chstring" to perform string search and replace.

The solution provided by Diane Pesco:

    chstring +x +s"*@s" "*@sv"

will also work, but we have recently made a change to "chstring" program.
The function of "+x" option has been reversed. Now, by default, "chstring"
will interpret "*", "_", and "\" as special characters. And, if you want
those character to be used literally you will have to use "+x" option.

Leonid.


On 18-03-04 05:08, "Anna Gudmundson" <anna.gudmundson at fraita.su.se> wrote:

> Dear Brian et al.
> 
> I'm trying to replace all occurences of  "@s" to "@sv", but I can't make it
> work.  We have used the sign @s to indicate code switching from itaian to
> swedish in our transcriptions, but now we would like to change it to @sv.
> There are several similar changes that need to be made so I really would
> like to know what I'm doing wrong. This is what it looks like:
> 
> *ANN: c'è tanto di più di questa # närhet at s.
> 
> I would like to change @s into @sv to make the utterance look like:
> 
> *ANN: c'è tanto di più di questa # närhet at sv.
> 
> I have created a file named 'changes.cut' and it looks like:
> 
> "@s " "@sv "
> 
> with no spaces before the @-signs.
> 
> and then i run the command:
> 
> chstring +c "filename"
> 
> but no changes are being made. If I instead create a 'changes.cut' file
> that looks like:
> 
> " tanto "  " tantoo "
> 
> and run the same command as above, the changes are being made.
> 
> I thought chstring would work on parts of words like @s, and not only on
> complete words. I've also tried "_*@s " "_*@sv ", but it doesn't work. What
> am I doing wrong??
> 
> Many thanks in advande
> 
> Anna Gudmundson
> Stockholm university 



More information about the Chibolts mailing list