Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nltk
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
nltk
Commits
48892c8b
Commit
48892c8b
authored
Nov 02, 2006
by
Steven Bird
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
put demo code into demo function
svn/trunk@3667
parent
1a03a3fc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
nltk_lite/draw/tree.py
+5
-2
No files found.
nltk_lite/draw/tree.py
View file @
48892c8b
...
@@ -876,8 +876,8 @@ def draw_trees(*trees):
...
@@ -876,8 +876,8 @@ def draw_trees(*trees):
## Demo Code
## Demo Code
##//////////////////////////////////////////////////////
##//////////////////////////////////////////////////////
import
random
def
demo
():
if
__name__
==
'__main__'
:
import
random
def
fill
(
cw
):
def
fill
(
cw
):
cw
[
'fill'
]
=
'#
%06
d'
%
random
.
randint
(
0
,
999999
)
cw
[
'fill'
]
=
'#
%06
d'
%
random
.
randint
(
0
,
999999
)
...
@@ -967,3 +967,6 @@ built from tree_to_treesegment."""
...
@@ -967,3 +967,6 @@ built from tree_to_treesegment."""
# Run mainloop
# Run mainloop
cf
.
mainloop
()
cf
.
mainloop
()
if
__name__
==
'__main__'
:
demo
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment