The package authors are aware that users would like to be able to write
to files and are considering changing this in a future version. In the
meantime, however, one has to use the underlying classes and methods,
which is not simple without a very good understanding of both Python and
the source code for the package.
--
You received this message because you are subscribed to the Google Groups "nltk-users" group.
To post to this group, send email to nltk-...@googlegroups.com.
To unsubscribe from this group, send email to nltk-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nltk-users?hl=en.
http://nltk.googlecode.com/svn/trunk/doc/api/nltk.text.Text-class.html
You may want to look at the source code of the Text.concordance()
function, see how it works and use a modified version of the code,
where print statements are replaced by output to file.
If your program did not require interaction with the user (e.g., if
you supplied the required info on command line instead) then there's
another solution: just redirect output of your program to a file:
python concordance.py parameters > output_file
Uldis
2010/11/3 Andrés Chandía <and...@chandia.net>:
> To unsubscribe from this group, send email to nltk-users+...@googlegroups.com.