[CWB] Exporting 'Function' results to file

lauren romeo lauren.romeo at incubio.com
Tue Feb 17 14:29:01 CET 2015


Thanks, Andrew,

Worked perfectly.

Lauren

2015-02-16 17:12 GMT+01:00 Hardie, Andrew <a.hardie at lancaster.ac.uk>:

>  Hi Lauren,
>
>
>
> You can easily add *> 'outputfile.txt';* to the end of a *count* command,
> if that’s what you are asking.
>
>
>
> Like this:
>
>
>
> count Q1 by word > 'out.txt';
>
>
>
> directly parallel to,
>
>
>
> cat Q1 > 'out.txt';
>
>
>
> Basically, adding > … to a command that prints something to screen makes
> it save it to file instead. Standard unix-style.
>
>
>
> best
>
>
>
> Andrew.
>
>
>
> *From:* cwb-bounces at sslmit.unibo.it [mailto:cwb-bounces at sslmit.unibo.it] *On
> Behalf Of *lauren romeo
> *Sent:* 16 February 2015 14:15
> *To:* cwb at sslmit.unibo.it
> *Subject:* [CWB] Exporting 'Function' results to file
>
>
>
> Hi!
>
>
>
> I have a question about exporting results to external files.
>
>
>
> I have seen in the documentation that to export the KWIC results of a
> query, one can use the command <*cat "query" > 'outputfile.txt';*>.
>
>
>
> Is it possible to export to a file the results of a "function" query?
>
>
>
> For instance, I am interested in exporting to a file a list of words, and
> their respective frequency counts, from a query similiar to this one:
>
>
>
>  <*Q1 = *[word = "[a-zA-Z0-9].*"]*; count Q1 by word;*>
>
>
>
> The result of this function would be similiar to this one:
>
>
>
> *5000    the  [#10000-#99999]*
>
> *4000    to  [#20000-#89999]*
>
> *3000    was  [#30000-#79999]*
>
> *2000    and  [#40000-#69999]*
>
> *1000    of  [#50000-#59999]*
>
>
>
> However, I do not want the KWIC results of the variable Q1, rather, My
> question is how can I export *the result of the function* <*count Q1 by
> word;> ?*
>
>
>
> Thank you in advance for any help!
>
> Lauren
>
>
>
>
>
> --
>
> *Lauren Romeo*
>
> PhD-Intern, Natural Language Processing
>
> Tekstum Solutions
>
> _______________________________________________
> CWB mailing list
> CWB at sslmit.unibo.it
> http://devel.sslmit.unibo.it/mailman/listinfo/cwb
>
>


-- 
*Lauren Romeo*
PhD-Intern, Natural Language Processing
Tekstum Solutions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://devel.sslmit.unibo.it/pipermail/cwb/attachments/20150217/cdd630e3/attachment.html>


More information about the CWB mailing list