A word that only appears in Westerns is a very discriminative word. Before we move on to building the classification model, let's just pick a couple of oddest words and see how they appear in context. I'm curious to know how "analysis" and "sentences" turn up in horror novels. To do this, the NLTK package provides a quick, easy way to do this with its concordance function. Concordance view of the word 'analysis' in horror texts: Concordance view of the word 'sentences' in horror texts: Displaying 15 of 15 matches: Although both words are fairly unique to our horror genre texts, neither one is used in a consistent way.
It's not clear to me why either of these words should be particularly associated with horror. I suspect it is simply relative to the other two genres.
B. M. Bower
It could also be simple statistical noise - both words are rare, even in the horror texts. The Mann-Whitney test identified words that were typically both uncommon and confined to a single genre. They were very powerful discriminators and I can imagine doing a pretty good job of classifying stories with just a handful of them. I'd hazard a guess that a rule of thumb like, "If you see the words 'trail' and 'cowboy' then you're reading a western," would perform amazingly well.
Yes, that's mostly a function of the easy genres I've selected A simple model is very appealing, but it ignores a lot of the information available. Not just those words which are highly specific to one genre, but also words that have slight probabilistic biases towards a genre. The problem we've seen is that really common words aren't very useful for discrimination, but they dominate over the very discriminatory rare words.
In TFIDF-weighted vector space, a weighting is applied so that words which occur in fewer documents are strengthened relative to words which appear in lots of documents. The purpose is, once again, to try to improve the signal-to-noise ratio. We've seen how the most discriminative words tend to be relatively uncommon ones that are localised to documents of a single genre.
Conversely, words that are poorly discriminative tend to be ones that appear in all texts - for example, "man" and "time. You'll see that "sail," which appears in roughly half as many texts, doubles its weighting relative to "night. This is far from the perfect solution. Although it is better than nothing, there will be uncommon but discriminative words which will not benefit from the TFIDF weighting.
TFIDF only boosts uncommon words if they appear in relatively few documents. It does nothing for words that are very common in one genre but still appear occassionally in every other document. Take the example of the word "hell. Now that we've given a bit more weight to those less common but discriminative words, let's fit a classification model. I'm going to use multinomial naive Bayes. MNBC is simple and easy to dissect, so we can examine which words are making the largest contributions.
In plain English, the naive Bayes classifier learns how likely it is to find each individual word in each different genre. For example, what are the chances of seeing the word "sail" in a horror novel? Then, on encountering a new document, it tries each genre on for size by asking: How likely is it that this story is a western? How likely a seafaring novel? I don't want to go into the formulae here it's too painful to type them in.
For the technical details, I've found these lecture notes from Carnegie Mellon Uni to be very clear see slides for multinomial NB. And Wikipedia is always a good place to start.
This was emphasised by the fact that the snowy mountain-top still held the sunset, and seemed to glow out with a delicate cool pink. Here and there we passed Cszeks and Slovaks, all in picturesque attire, but I noticed that goitre was painfully prevalent. By the roadside were many crosses, and as we swept by, my companions all crossed themselves.
Here and there was a peasant man or woman kneeling before a shrine, who did not even turn round as we approached, but seemed in the self-surrender of devotion to have neither eyes nor ears for the outer world.
- Navigation menu?
- The Trail of the White Mule by B.M. Bower.
There were many things new to me: Now and again we passed a leiter-wagon--the ordinary peasant's cart--with its long, snake-like vertebra, calculated to suit t. Genre probabilities for Dracula: Then the wild and distant seas where he rolled his island bulk; the undeliverable, nameless perils of the whale; these, with all the attending marvels of a thousand Patagonian sights and sounds, helped to sway me to my wish.
With other men, perhaps, such things would not have been inducements; but as for me, I am tormented with an everlasting itch for things remote. I love to sail forbidden seas, and land on barbarous coasts. Not ignoring what is good, I am quick to perceive a horror, and could still be social with it--would they let me--since it is but well to be on friendly terms with all the inmates of the place one lodges in.
By reason of these things, then, the whaling voyage was welcome; the great flood-gates of the wonder-world swung open, and in the wild conceits that swayed me to my purpose, two and two there floated into my inmost soul, endless processions of the whale, and, mid most of them all, one grand hooded phantom, like a snow hill in the air. Genre probabilities for Moby Dick: Here were lusty horsemen ridden from the heat of the sun, and the wet of the storm, to divert themselves awhile.
Youth untamed sat here for an idle moment, spending easily its hard-earned wages. City saloons rose into my vision, and I instantly preferred this Rocky Mountain place. More of death it undoubtedly saw, but less of vice, than did its New York equivalents. And death is a thing much cleaner than vice. Moreover, it was by no means vice that was written upon these wild and manly faces. Even where baseness was visible, baseness was not uppermost.
Daring, laughter, endurance--these were what I saw upon the countenances of the cow-boys. And this very first day of my knowledge of them marks a date with me. For something about them, and the idea of them, smote my American heart, and I have never forgotten it, nor ever shall, as long as I live. In their flesh our natural passions ran tumul. Genre probabilities for The Virginian: In fact, hard to believe.
The model assigns a virtually perfect probability of 1 to Dracula as being a horror novel, despite the fact that there is quite a bit of talk about sea travel in it! But naive Bayes is notorious for over-estimating the probability of the predicted class because of its feature independence assumption , so I won't get too excited about that. The important thing is that it is classifying both novels into the correct genre. Or, at least, the genre that they are conventionally classified into. Nary a hair out of place.
How great is that quote from The Virginian?! But it's a little weird that there isn't more error to be seen. I can't shake the feeling that I must have made some silly mistake. Just before finishing up, let's take a look under the hood. By "strongest contribution," I mean those words with the largest Pr word genre s. Largest left and smallest right contributing words to probability scores for each genre: The top contributing words are a different bunch again to those we've seen earlier. The largest contributing words don't contain many of the evocative words we saw from the Mann-Whitney test.
I like that "yuh" has topped the list for Westerns. If we look in our corpus, we find it occurs times in The Trail of the White Mule , once in Pieces of Eight and not at all in any other book. Bower must have loved this word, because it makes up almost 0.
- Theory and Implementation of Economic Models for Sustainable Development (Economy & Environment);
- The Trail of the White Mule;
So, roughly every th word will be "yuh! Hand over the roll, and that closes the deal.
See a Problem?
I didn't ask yuh would yuh buy--I'm givin' yuh somethin' fer your money, is all. I could take it off yuh after yuh quit kickin' and drive your remains in to this little burg, with a tale of how I'd caught a bootlegger that resisted arrest. So fork over the jack, old-timer. I want to catch that train over there that's about ready to pull out. That's five times in two sentences! Although it only appears in one Western, it's so common to that text that NBC learns it to be a very strong predictor.
Whether other westerns enjoy phonetic dialogue as much as White Mule is a different question. But Casey or perhaps Bower?
Get A Copy
Instead of finding the explanation for it, he stumbles onto a group of rowdy guys with a secret that might put them all in prison. When I read the title I was thinking literally, expecting some ghostly mule with a personality, but Bower was thinking of the Prohibition of her day and how far men would go to get around the law: I skimmed most of this book, at least from the time Casey got himself into his second mess, which was only partly his fault. He obviously didn't listen to my earlier advice about not being so trusting. But if he had, the book would have been a lot shorter.
LOL For me this was one of Bower's weakest and it got old fast. No horses, no mules, no cowboys, and no romance. One star is all I could manage to spare for it.
B. M. Bower - Wikipedia
I hope that Cow-Country , the final Bower title on my list, will make up for that. Otherwise I may have to go re-read one of my favorites just so I can finish this personal challenge on a good note! View all 3 comments. Jewel rated it it was amazing Oct 16, Cindy rated it liked it Jul 29, Zenny rated it it was amazing Dec 08, Billie rated it really liked it Oct 01, Franklin rated it liked it Nov 12, Wesley Yaryan marked it as to-read Feb 10, Hal added it May 11, Celia marked it as to-read Jun 20, Kimberly added it Feb 17, Bower gave birth to three children during her marriage to Clayton: Eventually, Clayton moved the family to a lonely hayfield cabin, which Bower nicknamed "Bleak Cabin," about a mile out of Big Sandy.
To help with rent, the Bowers accepted a boarder named Bill Sinclair. Sinclair, aged twenty-two, was nine years younger than Bower, but nevertheless a partnership began between them. Bower lent books to Sinclair and tutored him in writing while he helped her understand the finer points of cowpunching and critiqued the Western stories she had begun to write. In the meantime, Bower's first marriage had deteriorated.
After Bower had published Chip of the Flying U, her husband had begun to call her "my little red-headed gold mine.
The divorce was finalized in Throughout this difficult time, Bower continued to advance her career, signing her first short-story writing contract for Popular Magazine in January They rented a two-story home at Sixth Street North where they both focused on their writing careers. A daughter, Della Frances Sinclair, was born during a blizzard on January 24, That same hard winter destroyed the Sinclairs' breeding horse herd on land in eastern Valley County where they had hoped to move in the spring. After losing their herd, Bower and Sinclair left Montana for good and moved south and settled in a house on the coast in Santa Cruz, California.
Both Bower and Sinclair continued to pursue successful careers as writers over the course of several moves to various houses in California. However, by late summer, , Bower had separated from Sinclair and rented a house in San Jose, California. In , Bower and Cowan reopened a silver mine in Nevada and operated it for several years until the Great Depression forced them to move again, this time to Depoe Bay, Oregon.
Bower did not remarry again. Bower began writing to "save my sanity" after moving to Big Sandy with her first husband. Seeking financial independence from Clayton, she began sending stories to publishers in She regularly wrote new material while continuing to send out her old stories once a month.
- The Santorini Marriage Bargain (Mills & Boon Modern) (Mills and Boon Modern)!
- Show Offs: Tales of Forced Exhibitionism and Female Submission?
Bower published her first short story, "Strike of the Dishpan Brigade," locally in The book introduced readers to the fictional Flying U Ranch and the "Happy Family" of cowboys who lived there. The story line centers on a cowboy named Chip and his relationship with Dr. Della Whitmore, a self-reliant doctor from the East who "can shoot a coyote, laugh off a hazing, doctor a horse, and turn cowboys into pediatric orderlies.
But they fall in love after Della restores credit to Chip and after Chip rescues Della from a runaway horse. Bower went on to write 57 Western novels. She died in July in Los Angeles, California , at the age of