Freq in a bilingual conversation
Leonid Spektor
spektor at andrew.cmu.edu
Thu Jun 23 15:01:23 UTC 2011
Kevin,
The +s"@s:eng&spa" option needs a star character to match the actual word. So, the right command is +s"*@s:eng&spa".
A better command would be "freq +l myfile.cha +s at s&eng" for English words and command
"freq +l myfile.cha +s at s&spa" for Spanish words.
For more information about the +s at s option type "freq +s at s" in commands window. The +l option assigns explicit language tag to every word, thus making the use of +s"[- eng]" option unnecessary.
Leonid.
On Jun 23, 2011, at 08:05, Kevin Donnelly wrote:
> Hi
>
> I'm trying to run basic freq commands on a bilingual conversation marked up
> with the current CLAN default (ie with precodes). What I'm trying to do is to
> get figures for total number of words in each language. This would be:
> eng: words marked @s:eng, and unmarked words where the precode is [- eng];
> spa: unmarked words, and words marked @s:spa where the precode is [- eng];
> indeterminate: words marked @s:eng&spa.
>
> The command:
> clan/unix/bin/freq -s"@s:eng" clan/chats/myfile.cha
> gets the ones marked @s:eng, but also includes the ones marked @s:eng&spa.
> Using:
> clan/unix/bin/freq +s"@s:eng&spa" clan/chats/myfile.cha
> produces no results. I assume & has to be escaped, but \& doesn't work.
> Using
> clan/unix/bin/freq +s"@s:eng" +s"[- eng]" clan/chats/myfile.cha
> (to try and get all the English words, including the ones with precodes) also
> produces no results.
>
> I'd be grateful if someone could tell me the magic switches here. I suppose
> in more general terms the question is, how far can standard regular
> expressions be used in the CLAN command line - is there a special syntax, or
> are they not really expected to be used there?
>
> Thanks.
>
> --
> Pob hwyl / Best wishes
>
> Kevin Donnelly
> kevindonnelly.org.uk
>
> --
> You received this message because you are subscribed to the Google Groups "chibolts" group.
> To post to this group, send email to chibolts at googlegroups.com.
> To unsubscribe from this group, send email to chibolts+unsubscribe at googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/chibolts?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups "chibolts" group.
To post to this group, send email to chibolts at googlegroups.com.
To unsubscribe from this group, send email to chibolts+unsubscribe at googlegroups.com.
For more options, visit this group at http://groups.google.com/group/chibolts?hl=en.
More information about the Chibolts
mailing list