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
3613d831
Commit
3613d831
authored
Sep 05, 2012
by
Pierre-Francois Laquerre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clean unused variables from dependencygraph
parent
570c5cab
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
nltk/parse/dependencygraph.py
+4
-7
No files found.
nltk/parse/dependencygraph.py
View file @
3613d831
...
@@ -243,7 +243,6 @@ class DependencyGraph(object):
...
@@ -243,7 +243,6 @@ class DependencyGraph(object):
for
dep
in
node
[
'deps'
]:
for
dep
in
node
[
'deps'
]:
key
=
tuple
([
node
[
'address'
],
dep
])
#'%d -> %d' % (node['address'], dep)
key
=
tuple
([
node
[
'address'
],
dep
])
#'%d -> %d' % (node['address'], dep)
distances
[
key
]
=
1
distances
[
key
]
=
1
window
=
0
for
n
in
range
(
len
(
self
.
nodelist
)):
for
n
in
range
(
len
(
self
.
nodelist
)):
new_entries
=
{}
new_entries
=
{}
for
pair1
in
distances
:
for
pair1
in
distances
:
...
@@ -347,12 +346,10 @@ Nov. NNP 9 VMOD
...
@@ -347,12 +346,10 @@ Nov. NNP 9 VMOD
print
tree
.
pprint
()
print
tree
.
pprint
()
if
nx
:
if
nx
:
#currently doesn't work
#currently doesn't work
try
:
import
networkx
as
NX
import
networkx
as
NX
import
pylab
as
P
import
pylab
as
P
except
ImportError
:
g
=
dg
.
nx_graph
()
raise
g
=
dg
.
nx_graph
()
g
.
info
()
g
.
info
()
pos
=
NX
.
spring_layout
(
g
,
dim
=
1
)
pos
=
NX
.
spring_layout
(
g
,
dim
=
1
)
NX
.
draw_networkx_nodes
(
g
,
pos
,
node_size
=
50
)
NX
.
draw_networkx_nodes
(
g
,
pos
,
node_size
=
50
)
...
...
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