Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Frequency occurence of same words in a file

by davido (Cardinal)
on Mar 25, 2022 at 06:15 UTC ( [id://11142404]=note: print w/replies, xml ) Need Help??


in reply to Frequency occurence of same words in a file

Would 0011 Sally ever appear more than once? And if so, would the output contain two listings of Sally, or one?

0011 Sally 0011 Sally 0011 Sally # This? ------------- 0011 ---> 3 Sally Sally Sally # Or this? ---------- 0011 ---> 3 Sally

So the first question is what to do with collisions of the same name within the same prefix.

Also, what is the min and max for the numeric range? How many distinct numeric prefixes are there, and does the maximum prefix change over time?

I'm just wondering, as the solution may be different if we know more about the input data.


Dave

Replies are listed 'Best First'.
Re^2: Frequency occurence of same words in a file
by geek12 (Novice) on Mar 25, 2022 at 17:13 UTC
    Hi, 0011 Sally will be the only occurrence. Only coulmn on left can be multiple times but the right column will be unique. I was able to get the first solution working. thank you for the help.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11142404]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (2)
As of 2025-12-07 15:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (85 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.