problem when using '|' to pipe command lines.

Leonid Spektor spektor at andrew.cmu.edu
Thu May 31 13:55:48 UTC 2012


Huang,

	Pipe combines all the data from all input files into one data stream and outputs that data stream as one file. The result is that information about which file each data came from is lost. We do not recommend using Pipe if you want to keep data from each individual file separately in corresponding output data files.

	I have fixed TEXTIN to create language tag "eng" instead of "en" and installed CLAN on childes. Now you do not need to use CHSTRING command. The new commands you need to use are:

textin *.txt
mor *.txtin.cha +1
post *.txtin.cha +1
ren *.txtin.cha *.cha

or you can put them into batch file and run that batch file with this command "bat batch.cut".


	If you want to use your older version of CLAN, then here is a simpler list of commands, then you used in your example below,:

textin *.txt
chstring +s"en" "eng" *.txtin.cha +w +t at ID +t at Languages -t*
mor *.txtin.chstr.cex
post *.txtin.chstr.mor.cex
ren *.txtin.chstr.mor.pst.cex *.cha
del *.txtin.cha
del *.cex

You can also put those commands into batch file and run them with command "bat batch-old.cut".

I am attaching both of those batch files here:

-------------- next part --------------

-------------- next part --------------
A non-text attachment was scrubbed...
Name: batch.cut
Type: application/octet-stream
Size: 81 bytes
Desc: not available
URL: <http://listserv.linguistlist.org/pipermail/chibolts/attachments/20120531/fc227f66/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: batch-old.cut
Type: application/octet-stream
Size: 184 bytes
Desc: not available
URL: <http://listserv.linguistlist.org/pipermail/chibolts/attachments/20120531/fc227f66/attachment-0001.obj>
-------------- next part --------------


Leonid.



On May 31, 2012, at 05:33 , Huang Y.J. wrote:

> Dear Mr./Ms:
> 
> Hello, I am using CLAN under Windows7 to do POS grammar pattern search
> for a large corpus about 55 texts of 2000,000 words. In order to tag
> and all the files with mor at once and then do frequency and
> concordance search, I try to simplify the procedure by using pipe bar
> ?|? for multiple command lines.
> 
> E.g. In order to change the Language and ID code names systematically
> from ?en? to ?eng? through multi-files, and then following the mor and
> post commands for tagging, I tried to combine the commands together to
> run them in a batch by using ?|? in between each command line.
> 
> When the command lines are executed together in a pipe line, some
> errors occurred as the below.
> " Can't create file *.CHSTR.chstr.cex", perhaps it is opened by
> another application "
> (But when each command line is executed separately, the result is
> smooth and correct.)
> 
> I was wondering do you know what the problem is and how I can solve
> it? Or is there any other way that I can simplify the tagging and
> searching procedure in a batch for multiple files? (expecting to be a
> growing corpus of 50~100 files in 4~7 folders.)
> Thank you.
> 
> Best,
> Huang Y.J.
> 
> The pipe command lines I used and the result as the following:
> 
> textin *.txt | chstring +s"en" "eng" *.cha +w +t at ID -t* | chstring
> +s"en" "eng" *.chstr.cex +w +t at Languages -t* | mor *.*chstr.chstr.cex
> | post *.*chstr.chstr.mor.cex
> 
> The feedback message from CLAN:
> textin *.txt
> Mon May 28 00:11:56 2012
> textin (21-Feb-2012)
> ****************************************
> From file <Test.txt>
> Done with file <Test.txtin.cha>
> From string "en" to string "eng"
> Can't create file "*.chstr.cex", perhaps it is opened by another
> application
> From string "en" to string "eng"
> Can't create file "*.CHSTR.chstr.cex", perhaps it is opened by another
> application
> Can't create file "*.*CHSTR.CHSTR.mor.cex", perhaps it is opened by
> another application
> 
> Using file:      C:\Program Files\CHILDES\CLAN\lib\English Grammar
> (mor)\post.db.
> 
> Mon May 28 00:11:56 2012
> post (21-Feb-2012) is conducting analyses on:
>  ALL speaker tiers
> ****************************************
> From pipe input
> the file "*.*CHSTR.CHSTR.MOR.pst.cex" cannot be opened or created
>> 
> 
> -- 
> 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.
> 
> 

-------------- next part --------------
-- 
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