... paper suggest that a tagger can be trained to handle unknown words effectively By using the probabilistic lexicon, we can predict tags for unknown words based on probabilities estimated from training ... tested in real-world applications, using the hidden Markov model to disambiguate problem words no yes no yes no yes uses context information Table 1: Results using Various Methods to use the prefix ... prefix distribution or suffix distribution using entropy calculations clearly improves the performance over using the baseline method (about 4-5% overall), and using only suffix distributions improves...

... when you need the most accurate, current information Try it for free at http://safari.oreilly.com Acknowledgments This book challenged me more than any other book I've written I felt that I needed ... Stuart Halloway, and Dennis Sosnoski for agreeing to let me post your interviews in the book Thanks again to Justin Gehtland for use of your metrics, and being a partner through two writing projects ... Notebook before it was ready, I feel the need to offer some thanks for helping me through the negative press O'Reilly, you were great to stand behind me I felt that I needed to have this book...

... data is blurrythink about configuration, for example So, the Java folks are piling on framework after framework, creating this huge pipeline of transformations that can't be expressed in Java ... syntax is complex for no good reason .3 Typing One of the most fiercely debated topics in programming languages is the benefit of strong, static typing strategies Java's strategy opts for as much compile-time ... how a type is enforced, or interpreted In a weakly typed language (like C), variables can be coerced easily, or interpreted as something else A strongly typed language strictly enforces compatible...

... enough information Instead of just simply evaluating statements, you need to blow out a class, type everything, compile, and execute In Smalltalk, Lisp, Basic, and Ruby, you can just start typing For ... different, and convert objects that aren't The extra syntax provides valuethe compiler has more information to catch bugs earlier There's a cost, too Static typing makes you work harder to enter ... 1; int total = 1; for (int i=0; i...

... opt for strong, static typing There are at least two compelling reasons to so Static typing reduces certain types of errors (like misspelled variable names), and provides more information for ... developers have come to depend on, like method completion, rely on information in a variable's type You can't always get the same contextual information out of a Ruby or Smalltalk IDE 4.3.11 A Safety ... that supports multiple types You've got a surefire recipe for API bloat Need an example? Take the java.util.Array interface Please For convenience, you get more than 70 methods Peel back the...

... that I interviewed for this book recognized that static typing limits productivity for application development dramatically, though some said they were willing to pay the cost for certain types ... give For most application developers, the framework should much more for you 5.4.5 Dynamic Class Model The Java successor should be much more dynamic, and reflective Java's reflection API is particularly ... row[0] end This code example executes the code in bold for each row in the result set, which is passed into the code block's row variable For application programming, code blocks show up frequently...

... more convenient syntactic sugar Now, a for loop turns into this: irb(main):021:0> for c in 'g' 'k' irb(main):022:1> puts c irb(main):023:1> end g h i j k for/ in loops also work with Arrays and ... the same syntactic sugar for hashes as for arrays Code blocks make iteration tighter and easier If you're a big Java collections user who's used a dynamic language before, you probably noticed ... should also notice that false and "false" are different One is the Boolean constant for false, and one is a string For example, puts "It's false." unless "false" returns nil, but puts "It's false."...

... always take lessons learned into account), partially due to a lack of performance tuning on the original stack, but mostly due to the fact that the performance gains with Rails are easy to achieve ... was nearly effortless, and tuning the Java examples requires much more skill, time, and effort The Ruby version is fast enough to meet requirements, with very little additional effort 7.1.4 The ... was surprised at the level of performance I was able to achieve The Rails version of the app was fast, and faster even than the original Java version That's partially due to a better understanding...

... screens For example, here's the rendering for the shopping cart: html divNamed: 'cart' with: [ html small: [html bold: 'Your cart:'] html table: [ cart countsAndItems do: [:assoc | self renderRowForCount: ... SushiNet will reuse the component that renders the shipping address for the billing addresses Nice You'll enter your credit card information If it doesn't verify, you'll go back to the same screen ... choose whether to use this address for your billing address Again, this decision impacts the flow of the application If you don't want to use the same address for shipping and billing, SushiNet...

... operator bool, because that would allow for other operations that should be prohibited The conversion allows intrusive_ptr to be tested in Boolean contextsfor example, if (p), with p being an instance ... Often, it makes sense to parameterize these functions, and simply forward to member functions of the managed type to the work (for example, calling add_ref and release) If the reference counter ... We want this deletion to the right thingthat is, to call the destructor for the derived type The implementation is straightforward: add_ref increments the reference count and release decrements...

... the primary reasons for its success, but sometimes also a formidable source of headaches because of the complexity of certain parts of the language For instance, the rules for numeric conversions ... thrown, and therefore the function leaves scope immediately; catching and handling the error will be handled where it's suitable This is much better than explicitly testing for an empty shared_ptr ... whether the resource still exists If it doesn't, accessing it wreaks havoc With weak_ptrs, the information that the shared resource has been destroyed is propagated to all weak_ptrs observing...

... used to perform text substitutions It searches through the input data, finding all matches to the regular expression For each match of the expression, the algorithm calls match_results::format and ... calling regex_replace, we are expected to provide a format string as an argument This format string determines how the substitution will work In the format string, it's possible to refer to subexpression ... passing the format flag boost::regex::icase to the constructor of regex Note that you must also pass any other flags that you want to be in effect A common user error when setting format flags...