Commit 2c24d60c by Ewan Klein

Fixed variable scoping bug.

parent 230c4426
...@@ -377,14 +377,14 @@ def ieer_headlines(): ...@@ -377,14 +377,14 @@ def ieer_headlines():
from nltk.corpus import ieer from nltk.corpus import ieer
from nltk.tree import Tree from nltk.tree import Tree
print("IEER: First 20 Headlines") print("IEER: First 20 Headlines")
print("=" * 45) print("=" * 45)
trees = [doc.headline for file in ieer.fileids() for doc in ieer.parsed_docs(file)] trees = [(doc.docno, doc.headline) for file in ieer.fileids() for doc in ieer.parsed_docs(file)]
for tree in trees[:20]: for tree in trees[:20]:
print() print()
print("%s:\n%s" % (doc.docno, tree)) print("%s:\n%s" % tree)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment