[TriZPUG] A beginners question I am sure

Tim Arnold jtim.arnold at gmail.com
Sun Apr 3 00:56:46 CEST 2011

I may be missing something, but your code looks okay to me. I looked for the
source text and found a couple of examples that made me wonder though--in
one the lines were broken and in the other paragraphs were set in a single
line, but still not all the <hw> parts had <pos> parts.

Can you post a direct link to the file? Or maybe someone else will see a
problem in the code.  I would have used lists and not kept the files open,
but that's just a matter of taste--your logic looks right to me.
--Tim Arnold

On Sat, Apr 2, 2011 at 6:37 PM, Ken M <ken at mack-z.com> wrote:

> OK so working on a project (just started) that is for my own academic
> purposes for now.  Just trying to train myself in python.  The attached
> code snippet is to convert the websters dictionary (grab specific
> components) and insert them in a pipe delimmited data file for now.
> Next will be to a database.
> When I ran this for a 4.5 MB snippet of the file it worked fine, output
> file generated output good.  However when I run it for the entirety of
> the webster.txt file (45 MB) the program runs (well more apropos ends
> without any error message to me) but the output file I am creating is
> empty (0 bytes).
> The purpose for now is to build a subset dictionary file that is nothing
> more than word and the single letter initialism for word type (n = noun,
> v = verb, etc.)  Would appreciate insight into why this is not running
> to completion.  If anyone cares to know, I am running this on a Fedora
> 14 box, I edit and created my .py file with vim and my python
> installation is python-2.7-8.fc14.1.i686 (output from rpm -q python).
> Thanks in advance,
> Ken
> P.S.  To save bandwidth I did not attach the webster.txt file however if
> anyone wanted to run this against it themselves it can be acquired
> through the Project Gutenberg site.
> _______________________________________________
> TriZPUG mailing list
> TriZPUG at python.org
> http://mail.python.org/mailman/listinfo/trizpug
> http://trizpug.org is the Triangle Zope and Python Users Group
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/trizpug/attachments/20110402/50b31549/attachment.html>

More information about the TriZPUG mailing list