Skip to content

Commit 25c2599

Browse files
authored
Merge pull request #3 from vaaaaanquish/add_img
add sample image
2 parents ec782e4 + ce3b34f commit 25c2599

File tree

6 files changed

+63
-0
lines changed

6 files changed

+63
-0
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020, vaaaaanquish
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,48 @@
11
# Cloudia
22
Tools to easily create a word cloud.
33

4+
### from string
5+
```
6+
from cloudia import Cloudia
7+
8+
text = "text data"
9+
Cloudia(text).plot()
10+
```
11+
12+
![sample_img](https://github.com/vaaaaanquish/cloudia/blob/021a6d151fb6a3b579dc96b7086356fc0c225852/examples/img/sample_img.png?raw=true, "sample_img")
13+
14+
from : [20 Newsgroups](http://qwone.com/~jason/20Newsgroups/)
15+
16+
17+
### from pandas
18+
```
19+
df = pd.DataFrame({'wc1': ['sample1','sample2'], 'wc2': ['hoge hoge piyo piyo fuga', 'hoge']})
20+
21+
# plot from df
22+
Cloudia(df).plot()
23+
24+
# add df method
25+
df.wc.plot(dark_theme=True)
26+
```
27+
28+
![pandas_img](https://github.com/vaaaaanquish/cloudia/blob/021a6d151fb6a3b579dc96b7086356fc0c225852/examples/img/pandas_img.png?raw=true, "pandas_img")
29+
![dark_img](https://github.com/vaaaaanquish/cloudia/blob/021a6d151fb6a3b579dc96b7086356fc0c225852/examples/img/dark_img.png?raw=true, "dark_img")
30+
31+
from pandas.DataFrame or pandas.Series.
32+
33+
34+
### from japanese
35+
```
36+
text = "これはCloudiaのテストです。WordCloudをつくるには本来、形態素解析の導入が必要になります。Cloudiaはmecabのような形態素解析器の導入は必要はなくnagisaを利用した動的な生成を行う事ができます。nagisaとjapanize-matplotlibは、形態素解析を必要としてきたWordCloud生成に対して、Cloudiaに対して大きく貢献しました。ここに感謝の意を述べたいと思います。"
37+
38+
Cloudia(text).plot()
39+
```
40+
41+
![japanese_img](https://github.com/vaaaaanquish/cloudia/blob/021a6d151fb6a3b579dc96b7086356fc0c225852/examples/img/japanese_img.png?raw=true, "jap_img")
42+
43+
from japanese without morphological analysis module
44+
45+
446
# Require
547

648
I'm waiting for this [PR](https://github.com/uehara1414/japanize-matplotlib/pull/9).

examples/img/dark_img.png

20.5 KB
Loading

examples/img/japanese_img.png

65.2 KB
Loading

examples/img/pandas_img.png

22.8 KB
Loading

examples/img/sample_img.png

173 KB
Loading

0 commit comments

Comments
 (0)