Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
keeleliin
word_cloud_est
Commits
36889bf7
Commit
36889bf7
authored
Sep 29, 2014
by
Andreas Mueller
Browse files
make process_text and fit_words public again
parent
471c9bd3
Changes
1
Hide whitespace changes
Inline
Side-by-side
wordcloud/wordcloud.py
View file @
36889bf7
...
...
@@ -119,7 +119,7 @@ class WordCloud(object):
max_font_size
=
height
self
.
max_font_size
=
max_font_size
def
_
fit_words
(
self
,
words
):
def
fit_words
(
self
,
words
):
"""Generate the positions for words.
Parameters
...
...
@@ -232,7 +232,7 @@ class WordCloud(object):
self
.
layout_
=
zip
(
words
,
font_sizes
,
positions
,
orientations
,
colors
)
return
self
.
layout_
def
_
process_text
(
self
,
text
):
def
process_text
(
self
,
text
):
"""Splits a long text into words, eliminates the stopwords.
Parameters
...
...
@@ -301,14 +301,14 @@ class WordCloud(object):
def
generate
(
self
,
text
):
"""Generate wordcloud from text.
Calls
_
process_text and
_
fit_words.
Calls process_text and fit_words.
Returns
-------
self
"""
self
.
_
process_text
(
text
)
self
.
_
fit_words
(
self
.
words_
)
self
.
process_text
(
text
)
self
.
fit_words
(
self
.
words_
)
return
self
def
_check_generated
(
self
):
...
...
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