Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
word_cloud_est
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
keeleliin
word_cloud_est
Commits
e5631add
Commit
e5631add
authored
Jun 29, 2016
by
Andreas Mueller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
don't use python2 by default in examples, fix stopwords in colored.py
parent
13ee3c86
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
6 deletions
+7
-6
examples/a_new_hope.py
examples/a_new_hope.py
+1
-1
examples/colored.py
examples/colored.py
+4
-3
examples/masked.py
examples/masked.py
+1
-1
examples/simple.py
examples/simple.py
+1
-1
No files found.
examples/a_new_hope.py
View file @
e5631add
#!/usr/bin/env python
2
#!/usr/bin/env python
"""
Using custom colors
====================
...
...
examples/colored.py
View file @
e5631add
#!/usr/bin/env python
2
#!/usr/bin/env python
"""
Image-colored wordcloud
========================
...
...
@@ -25,10 +25,11 @@ text = open(path.join(d, 'alice.txt')).read()
# read the mask / color image
# taken from http://jirkavinse.deviantart.com/art/quot-Real-Life-quot-Alice-282261010
alice_coloring
=
np
.
array
(
Image
.
open
(
path
.
join
(
d
,
"alice_color.png"
)))
stopwords
=
set
(
STOPWORDS
)
stopwords
.
add
(
"said"
)
wc
=
WordCloud
(
background_color
=
"white"
,
max_words
=
2000
,
mask
=
alice_coloring
,
stopwords
=
STOPWORDS
.
add
(
"said"
),
max_font_size
=
40
,
random_state
=
42
)
stopwords
=
stopwords
,
max_font_size
=
40
,
random_state
=
42
)
# generate word cloud
wc
.
generate
(
text
)
...
...
examples/masked.py
View file @
e5631add
#!/usr/bin/env python
2
#!/usr/bin/env python
"""
Masked wordcloud
================
...
...
examples/simple.py
View file @
e5631add
#!/usr/bin/env python
2
#!/usr/bin/env python
"""
Minimal Example
===============
...
...
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