-
Notifications
You must be signed in to change notification settings - Fork 2.3k
It does not display the tonal in Thai. #272
Copy link
Copy link
Open
Description
import matplotlib.pyplot as plt
from wordcloud import WordCloud
text = "แมว กิน ปลา แมว มัน ชอบ นอน นอน กลางวัน นอน แล้ว นอน อีก เป็น สัตว์ ที่ ขี้เกียจ จริงๆ เลย แมว แต่ แมว มัน เข้ากับ คน ได้ดี ฉัน ชอบ แมว"
wordcloud = WordCloud(font_path='THSarabunNew.otf',
relative_scaling = 1.0,
min_font_size=4,
background_color="white",
width=1024,
height=768,
scale=3,
font_step=1,
collocations=False,
margin=2
).generate(text)
plt.imshow(wordcloud, cmap=plt.cm.gray, interpolation='bilinear')
plt.axis("off")
plt.show()It does not display the tonal in Thai. Both of which I use Thai font.
Thank You.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
