November 14, 2025

wordcloud using different scripts

# Download multi-lingual font GoNotoSouthAsia.ttf
# https://github.com/satbyy/go-noto-universal/releases/

from wordcloud import WordCloud
import matplotlib.pyplot as plt

text = """
গমভন গমভন গমভন ગમભન ગમભન ગમભન
गमभन गमभन गमभन गमभन ಗமಭನ ಗமಭನ ಗமಭನ
ଗମଭନ   ਗਮਭਨ ਗਮਭਨ  గమభన గమభన கமபன கமபன  கமபன
"""

wc = WordCloud(font_path="/home/GoNotoSouthAsia.ttf",
width=800, height=400, background_color="white"
).generate(text)

plt.imshow(wc, interpolation="bilinear")
plt.axis("off")
plt.show()


No comments:

Post a Comment

Note: Only a member of this blog may post a comment.