amueller / word_cloud

A little word cloud generator in Python
https://amueller.github.io/word_cloud
MIT License
10.19k stars 2.32k forks source link

Wordcloud returns an error when files exceed 15MB #760

Open FabienBounoir opened 9 months ago

FabienBounoir commented 9 months ago

Description

Wordcloud returns an error when files exceed 15MB.

Steps/Code to Reproduce

To reproduce the error, simply provide a text file larger than 15MB; the library will return a 'killed' error.

Expected Results

Ensure that the library does not terminate the program and that it accepts files larger than 15MB.

Actual Results

The librar terminate the program when files exced 15MB.

Versions

Linux-5.4.0-126-generic-x86_64-with-glibc2.29 Python 3.8.10 (default, Nov 14 2022, 12:59:47) [GCC 9.4.0] NumPy 1.24.1 matplotlib 3.6.3 wordcoud 1.8.2.2

amueller commented 9 months ago

Did you use the CLI? What arguments did you provide?

FabienBounoir commented 9 months ago

Hello I use this in my python script:

wc = WordCloud(
        max_words=10000,
        mask=logo_mask,
        max_font_size=20,
        random_state=42,
        relative_scaling=0,
    )

    # generate word cloud
    wc.generate(text)
    plt.imshow(wc)

    # create coloring from image
    image_colors = ImageColorGenerator(logo_color)
    wc.recolor(color_func=image_colors)
    plt.figure(figsize=(10, 10))
    plt.imshow(wc, interpolation="bilinear")
    plt.axis("off")
    wc.to_file("./../image/" + channel_name +
               "_" + dateFormated + ".png")
FabienBounoir commented 7 months ago

@amueller idea ?