Skip to content

Commit e0641ef

Browse files
committed
fix: wordcloud example
1 parent 9382184 commit e0641ef

File tree

5 files changed

+978
-978
lines changed

5 files changed

+978
-978
lines changed

data/clean/f_103_armel.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ def f_103(text):
2121
- matplotlib.pyplot
2222
2323
Example:
24-
>>> f_103('Visit https://www.python.org for more info. Python is great. I love Python.')
25-
<wordcloud.WordCloud object at ...>
26-
>>> f_103('Check out this link: http://www.example.com. Machine learning is fascinating.')
27-
<wordcloud.WordCloud object at ...>
24+
>>> print(f_103('Visit https://www.python.org for more info. Python is great. I love Python.').words_)
25+
{'Python': 1.0, 'Visit': 0.5, 'info': 0.5, 'great': 0.5, 'love': 0.5}
26+
>>> print(f_103('Check out this link: http://www.example.com. Machine learning is fascinating.').words_)
27+
{'Check': 1.0, 'link': 1.0, 'Machine': 1.0, 'learning': 1.0, 'fascinating': 1.0}
2828
"""
2929
# Remove URLs
3030
text = re.sub(r"http[s]?://\S+", "", text)

data/processed/35_w_doc.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ def task_func(text):
2121
- matplotlib.pyplot
2222
2323
Example:
24-
>>> task_func('Visit https://www.python.org for more info. Python is great. I love Python.')
25-
<wordcloud.WordCloud object at ...>
26-
>>> task_func('Check out this link: http://www.example.com. Machine learning is fascinating.')
27-
<wordcloud.WordCloud object at ...>
24+
>>> print(task_func('Visit https://www.python.org for more info. Python is great. I love Python.').words_)
25+
{'Python': 1.0, 'Visit': 0.5, 'info': 0.5, 'great': 0.5, 'love': 0.5}
26+
>>> print(task_func('Check out this link: http://www.example.com. Machine learning is fascinating.').words_)
27+
{'Check': 1.0, 'link': 1.0, 'Machine': 1.0, 'learning': 1.0, 'fascinating': 1.0}
2828
"""
2929
text = re.sub(r"http[s]?://\S+", "", text)
3030
if not text.strip(): # Check if text is not empty after URL removal

data/raw/f_103_armel.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ def f_103(text):
2121
- matplotlib.pyplot
2222
2323
Example:
24-
>>> f_103('Visit https://www.python.org for more info. Python is great. I love Python.')
25-
<wordcloud.WordCloud object at ...>
26-
>>> f_103('Check out this link: http://www.example.com. Machine learning is fascinating.')
27-
<wordcloud.WordCloud object at ...>
24+
>>> print(f_103('Visit https://www.python.org for more info. Python is great. I love Python.').words_)
25+
{'Python': 1.0, 'Visit': 0.5, 'info': 0.5, 'great': 0.5, 'love': 0.5}
26+
>>> print(f_103('Check out this link: http://www.example.com. Machine learning is fascinating.').words_)
27+
{'Check': 1.0, 'link': 1.0, 'Machine': 1.0, 'learning': 1.0, 'fascinating': 1.0}
2828
"""
2929
# Remove URLs
3030
text = re.sub(r"http[s]?://\S+", "", text)

0 commit comments

Comments
 (0)