Giter Club home page Giter Club logo

Comments (10)

guo-yong-zhi avatar guo-yong-zhi commented on August 15, 2024 1

Now, after 8e5137b, the new usage is:

using WordCloud
text = "Word word word words" #or text = ["Word" => 1, "word" => 2, "words" => 1]
@show processtext(text) #process=casemerge!∘lemmatize!, case-insensitive
@show processtext(text, process=lemmatize!) #only lemmatize!, case-sensitive
@show processtext(text, process=casemerge!) #only casemerge!
@show processtext(text, process=identity) #neither

from wordcloud.jl.

guo-yong-zhi avatar guo-yong-zhi commented on August 15, 2024

Yes, there is a default function casemerge! to handle the case of words.

using WordCloud
text = "Julia julia julia"
@show processtext(text) #counterprocessor=casemerge!
@show processtext(text, counterprocessor=identity)

And, I would really appreciate it if you can help improve the docs. It is a little bit hard for a non-native English speaker like me.

from wordcloud.jl.

jakewilliami avatar jakewilliami commented on August 15, 2024

Is there a way to use casemerge with the counter dict?

julia> using WordCloud;

julia> countmap = Dict("Julia" => 1, "julia" => 2);

julia> processtext(countmap, counterprocessor = casemerge!) # currently this throws an error
3 words
1 different word
1 legal word
1 huge word
(["Julia"], [1])

Or perhaps I am misunderstanding?

from wordcloud.jl.

guo-yong-zhi avatar guo-yong-zhi commented on August 15, 2024

countmap need not to be processed as text, wordcloud can accept a Dict as its input, just

using WordCloud;
countmap = Dict("Julia" => 1, "julia" => 2)
wordcloud(casemerge!(countmap))

from wordcloud.jl.

jakewilliami avatar jakewilliami commented on August 15, 2024

Ah, my bad. I was using processtext because I wanted to use minfrequency but I couldn’t find out how to use minfrequency with just wordcloud.

from wordcloud.jl.

guo-yong-zhi avatar guo-yong-zhi commented on August 15, 2024

Oh, yes, you are right. In some case, we may want the processtext to process a weight Dict. The interface needs to be improved. Currently you can call the function this way:

processtext(casemerge!(countmap))

from wordcloud.jl.

jakewilliami avatar jakewilliami commented on August 15, 2024

Ahh I see, thank you. I will let you know when I get around to doing the documentation. Hopefully I can get some time some time this weekend.

from wordcloud.jl.

guo-yong-zhi avatar guo-yong-zhi commented on August 15, 2024

Thank you. I'm looking forward to it.

from wordcloud.jl.

jakewilliami avatar jakewilliami commented on August 15, 2024

Great! May you please send me an email so that I can ask some questions about documentation? My email is on my profile (or I think in my GH pages website)

from wordcloud.jl.

guo-yong-zhi avatar guo-yong-zhi commented on August 15, 2024

The bug was fixed at v0.7.0. I closed the issue and we can discuss other things in the email.

from wordcloud.jl.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.