Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^8: putting text into array word by word

by jms53 (Monk)
on Jan 10, 2012 at 19:47 UTC ( #947224=note: print w/replies, xml ) Need Help??


in reply to Re^7: putting text into array word by word
in thread putting text into array word by word

hadn't thought about that. Good catch, thanks!

  • Comment on Re^8: putting text into array word by word

Replies are listed 'Best First'.
Re^9: putting text into array word by word
by Not_a_Number (Parson) on Jan 10, 2012 at 20:02 UTC

    OK, let's extract another worm from the can we've opened. Say we want to count all the times 'John' appears in a text. Given a sentence:

    Was it John or John's brother?

    Should the count be one or two?

      Actually, that is the next part of what I'm going to do.

      However, since I am only interested in words from the English dictionary, it doesn't matter so much whether John's is counted or not as John. (export to csv, open in spreadsheet).

      I would however be extremely interested in knowing how you would change this, as I will get that kind of issue with contractions (it's, wouldn't, etc. that I had planned on tackling with a spreadsheet, (but then again, I am trying to minimize user interaction)

      Thank you

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://947224]
help
Chatterbox?
[stevieb]: shmem thanks for the 'insight' :P
[shmem]: good thing that Sun already took "OpenWindows", otherwise I'd not stop to shudder imagining an "OpenWindows" from MS
[shmem]: more garbage in, more garbage out that would be
[stevieb]: I found that win10 broke a C# library I was using for one project while enhancing tests for a Perl dist, which breaks other Perl dists, and I'm about to throw my hands up on berrybrew. win2k12 broke one thing, win10 breaks something...
[stevieb]: ...unrelated which requires replacing a lot of code and a whole lib. I'm about to go nix only ffs
[shmem]: stevieb: what you're doing sounds afwully complex. Too much for me this evening to provide brighter insight ;-)
[stevieb]: I don't even own a Windows computer. Both my girl and I have a laptop each with Linux. I'm supporting Windows in some of my projects and I can't even guage whether it's worth it or not.
[stevieb]: shmem It's something I desired to have years ago, which is why I took over berrybrew. Cross-platform build/test automation locally, or over the network Test::BrewBuild
[shmem]: sounds good.
[shmem]: but I'm crumbling smaller stones. remember...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2017-03-28 22:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (342 votes). Check out past polls.