Skip to content

Create a new wordcloud operator using Python wordcloud library - #2157

Merged
kunwp1 merged 6 commits into
masterfrom
chris-wordcloud-to-python
Sep 23, 2023
Merged

Create a new wordcloud operator using Python wordcloud library#2157
kunwp1 merged 6 commits into
masterfrom
chris-wordcloud-to-python

Conversation

@kunwp1

@kunwp1 kunwp1 commented Sep 22, 2023

Copy link
Copy Markdown
Contributor

This PR introduces a new operator using the Python wordcloud library to generate a wordcloud.

PLEASE NOTE
In order to use this operator, the user must install the wordcloud library. To facilitate this, a operator-requirements.txt file has been created under core/amber. In the future, this file will contain python libraries that are required to use python native operators (#2143). For now, simply run pip install -r operator-requirements.txt to install the wordcloud library.

Currently, the operator is named "Word Cloud V2" and includes the same inputs as the existing wordcloud operator, such as the text column and the maximum number of words to display. The output of the new operator is an HTML string with the wordcloud image embedded, allowing users to view the wordcloud directly from the operator.

The new wordcloud operator generates a fixed-size image with a resolution of 1920 x 1080. Additionally, it includes digits as words in the wordcloud and uses the stopwords provided in the wordcloud library. However, we may plan to improve this feature by allowing users to customize these parameters.

In the new operator, we have removed the "Normalization Scale" feature as users can easily identify which words are more frequent based on the image generated by the new operator. This decision was made after a group meeting.

Lastly, this pull request includes enhancing the existing image visualizer operator. The change allows the image to be resized based on the window size.

capture

@kunwp1 kunwp1 added the feature label Sep 22, 2023
@kunwp1
kunwp1 requested a review from aglinxinyuan September 22, 2023 22:48
@kunwp1 kunwp1 self-assigned this Sep 22, 2023

@aglinxinyuan aglinxinyuan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@kunwp1
kunwp1 merged commit aeffb80 into master Sep 23, 2023
@kunwp1
kunwp1 deleted the chris-wordcloud-to-python branch September 23, 2023 05:07
Yicong-Huang added a commit that referenced this pull request Sep 28, 2023
Following up on #2157, this PR adds a dependency file
`operator-requirements.txt`, which declares the dependencies used in
native Python operators.
yangzhang75 pushed a commit to yangzhang75/texera that referenced this pull request Jun 22, 2026
…e#2157)

This PR introduces a new operator using the [Python wordcloud
library](https://github.com/amueller/word_cloud) to generate a
wordcloud.

**PLEASE NOTE**
In order to use this operator, the user must install the wordcloud
library. To facilitate this, a `operator-requirements.txt` file has been
created under `core/amber`. In the future, this file will contain python
libraries that are required to use python native operators (apache#2143). For
now, simply run `pip install -r operator-requirements.txt` to install
the wordcloud library.

Currently, the operator is named "Word Cloud V2" and includes the same
inputs as the existing wordcloud operator, such as the text column and
the maximum number of words to display. The output of the new operator
is an HTML string with the wordcloud image embedded, allowing users to
view the wordcloud directly from the operator.

The new wordcloud operator generates a fixed-size image with a
resolution of 1920 x 1080. Additionally, it includes digits as words in
the wordcloud and uses the stopwords provided in the wordcloud library.
However, we may plan to improve this feature by allowing users to
customize these parameters.

In the new operator, we have removed the "Normalization Scale" feature
as users can easily identify which words are more frequent based on the
image generated by the new operator. This decision was made after a
group meeting.

Lastly, this pull request includes enhancing the existing image
visualizer operator. The change allows the image to be resized based on
the window size.


![capture](https://github.com/Texera/texera/assets/143021053/dee28070-55a4-409c-b3b4-c37cfbcab1f8)

---------

Co-authored-by: Xinyuan Lin <xinyual3@uci.edu>
yangzhang75 pushed a commit to yangzhang75/texera that referenced this pull request Jun 22, 2026
Following up on apache#2157, this PR adds a dependency file
`operator-requirements.txt`, which declares the dependencies used in
native Python operators.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants