/* package whatever; // don't place package name! */ import java.util.*; import java.lang.*; import java.io.*; /* Name of the class has to be "Main" only if the class is public. */ class Ideone { double max = 0; if(W.containsKey(a)) if(W.get(a) > max){ max = W.get(a); res = a;} } return res; } { long all = 0; in.useDelimiter("[—,.!:;? \n«»()\"]"); while(in.hasNext()){ txt = in.next(); if(!txt.equals("") && !txt.equals("-")){ if(W.containsKey(buf)){ W.put(buf, W.get(buf) + 1.0); all++;} else{ W.put(buf, 1.0); all++;} } } // for(String a : W.keySet()) W.put(a, W.get(a)/all); if(SW.containsKey(W.get(a))){ SW.get(W.get(a)).add(a); } else{ List<Object> buf = new ArrayList<Object>(); buf.add(a); SW.put(W.get(a), buf) ; } try{ //System.outmax(arr); } } int n = SW.get(a).size(); for(int i = 0; i < n; i++){ } } } }
To be, or not to be? That is the question— Whether ’tis nobler in the mind to suffer The slings and arrows of outrageous fortune, Or to take arms against a sea of troubles, And, by opposing, end them? To die, to sleep— No more—and by a sleep to say we end The heartache and the thousand natural shocks That flesh is heir to—’tis a consummation Devoutly to be wished! To die, to sleep. To sleep, perchance to dream—ay, there’s the rub, For in that sleep of death what dreams may come When we have shuffled off this mortal coil, Must give us pause. There’s the respect That makes calamity of so long life. For who would bear the whips and scorns of time, Th’ oppressor’s wrong, the proud man’s contumely, The pangs of despised love, the law’s delay, The insolence of office, and the spurns That patient merit of th’ unworthy takes, When he himself might his quietus make With a bare bodkin? Who would fardels bear, To grunt and sweat under a weary life, But that the dread of something after death, The undiscovered country from whose bourn No traveler returns, puzzles the will And makes us rather bear those ills we have Than fly to others that we know not of? Thus conscience does make cowards of us all, And thus the native hue of resolution Is sicklied o’er with the pale cast of thought, And enterprises of great pith and moment With this regard their currents turn awry, And lose the name of action.—Soft you now, The fair Ophelia!—Nymph, in thy orisons Be all my sins remembered.
276 1.0 => thought, whips, fair, resolution, pangs, cast, suffer, remembered, pith, action, heartache, o’er, pale, you, devoutly, soft, give, natural, lose, them, come, whose, something, himself, delay, ay, must, returns, shocks, flesh, nymph, bodkin, love, against, nobler, turn, dread, sea, long, moment, currents, native, does, after, so, insolence, takes, orisons, mind, spurns, question, may, man’s, more, weary, great, off, wrong, fly, regard, under, thousand, rub, but, country, sicklied, despised, traveler, thy, conscience, arrows, wished, office, enterprises, his, whether, than, from, bare, bourn, those, others, coil, proud, puzzles, might, cowards, shuffled, merit, my, pause, respect, sins, take, contumely, perchance, dream, name, know, arms, unworthy, oppressor’s, law’s, rather, their, slings, dreams, troubles, awry, grunt, calamity, heir, consummation, patient, now, ills, outrageous, scorns, mortal, undiscovered, opposing, fortune, will, fardels, say, quietus, what, sweat, hue, time, he, ophelia. 2.0 => when, would, th’, thus, there’s, by, have, makes, ’tis, die, all, this, who, no, death, for, life, not, end, make, or. 3.0 => in, is, bear, us, with. 4.0 => be, we. 5.0 => sleep, a. 7.0 => that. 12.0 => and. 15.0 => to, of. 20.0 => the.