Friday, February 18, 2011

New Old Cookbook Search

I mentioned in an earlier post that I was redoing the guts behind the Medieval Cookbook Search. Today I'm announcing that the monumental task is now complete (and you probably can't imagine how happy that makes me).

Not only is the search more efficient now, but there are a couple of new features that I think will prove very helpful.

As before, the search page offers the opportunity to search for one or more ingredients in all the cookbooks, or in just a single one.


There's a behind-the-scenes benefit here in that the list of cookbooks is now dynamically generated. This makes maintenance a bit easier.

I also changed the code behind the search algorithm to make it immensely easier to add search terms and update the index files. Because of this I've added a note asking for input and corrections, along with a link to the site's contact page.

Part of my motivation for this rests in a post I read on a mailing list quite some time ago that
noted problems when searching one of the books for the word "wine". Apparently I had inadvertently deleted that search term on one of the times I was working on the index. Now I should be able to correct that sort of problem without trashing something else.

Those changes aren't all that visible though, and probably appeal only to the database geeks out there. The next couple of changes are more useful for the search users.


The recipe display now highlights the found terms within the recipe. This is something I've wanted to do for a while, but the old search code didn't really allow for it.

Beneath the recipe there is still the section I added a while back listing equivalent recipes.


This data comes from a manually maintained database, which means unless I happen across equivalent recipes in one or more cookbooks (or someone else finds them and tells me), and unless I get around to entering the data, there may or may not be anything to show.

The new fun section shows up immediately below the "equivalents".


The "similar titles" section is automatically generated when I build the indexes. It algorithmically pares down the recipe title to its base words, and then looks for other recipes with titles that sound the same (this helps deal with medieval spelling variations).

This feature should help users locate other versions of the displayed recipe, whether I or anyone else has matched them up. I know I'm a geek, but I think this is positively epic (my sons' favorite word lately).

Hopefully the new search code will work well. If you use it and have any comments, I'd love to hear them!

Tuesday, February 8, 2011

Excuses, excuses...

Before getting into the subject of this rant, here's a warning about what triggered it:

Yes, I've been watching The Tudors

From what I've been told by people who research various aspects of medieval life (clothing, painting, religion, history, etc.) this program is filled with all sorts of wild inaccuracies, so why should cooking and food be treated any differently?

Surprisingly, for a television series that is so lavish with costumes and settings, food is almost ignored (well, maybe that's not too surprising - very few shows or films deal much with food, probably because it's a very hard thing to film well). Where the show does touch on the topic, they seem to invariably go way wrong.

At the end of the second season, King Henry is presented with a swan pie. Awesome! The thing is the right shape, and they even decorated it with the head and wings of the swan. Then Henry breaks the top crust and starts eating the contents with his fingers. This is a minor quibble, I know, but he would have used a spoon. They had spoons in medieval times. They even have spoons at Medieval Times ("Would you like a refill on that Pepsi?").

Then there are the grapes. In almost every scene depicting a dinner or banquet there are grapes on the table - even in the scenes set in winter. Somehow they've got grapes ready for harvest year round in England. That, or they've managed to work out overnight transport from the southern hemisphere.

What really set my teeth on edge though was something in the episode I watched last night. Henry holds up a piece of fruit and tells Suffolk that it comes from the New World. That would have been Ok, but it was a starfruit, which aren't native to anywhere in the New World but instead come from Indonesia.

[Aside: I suppose they could have used a pawpaw, but given their short shelf life that wouldn't have been much better (maybe they were brought over on the same express flight as the grapes). Tomato? No, they were known but considered poisonous. A potato then, or maybe a peanut. Heck, how about tobacco?]

Now some might say that this kind of criticism is misplaced. The show's creator, Michael Hirst, dismissed complaints of inaccuracy by stating "Showtime commissioned me to write an entertainment, a soap opera, and not history ... And we wanted people to watch it."

That's just bunk.

Hirst is spinning his departures from reality as being artistic deviation, changes to make the story more interesting. I'll buy that for the bit with Henry eating the swan pie, but for the other errors it's just an excuse for laziness. Hirst simply doesn't care enough to expend the minuscule amount of effort to even get vaguely close to right (like on the same continent).

In the meanwhile, I keep watching. It is entertaining, after all, and it helps me to keep up with the nonsense that people learn from Hollywood about medieval Europe.

Tuesday, February 1, 2011

Middle-English Words that I Hate

A couple of weeks back I was talking with a friend about indexing texts.  She (Hi Drea!) works with medieval dye recipes rather than culinary ones, but we both have the same sorts of problems with trying to search texts that are littered with spelling variations and foreign words.

That conversation got me thinking about, and then experimenting with, a couple possibilities for an improved cookbook search for my website.  One of my tests proved to be very functional and much more efficient, so now I've got the new indexing and search interface written and am half way through building new indexes for all the cookbooks.

(While building the indexes is no longer as much work as it used to be - and the new system is a lot more maintainable - it's still a rather labor intensive task.)

Two of the texts I've done so far - "Two Fifteenth Century Cookery Books" and "Forme of Cury" - are the most irritating.  They're not only large and loaded with medieval spellings, but they contain many uses of certain words I've now come to loathe.

Pyk - This word, along with its variants (pik, pyke, etc.) can mean pike (as in "Take a fresh pyk and remove the scales") or pick (as in "and then pyk out the bones").  This word is by far the worst, with no consistency in how a given spelling is used.  The only saving grace is that "pick" isn't an ingredient, so I could go through the text and mark all the cases where "pyk" meant "pick" so they wouldn't be indexed.  Anything left is therefore "pike".

Flowre - There are a surprising number of variants for this one (flour, flower, floure).  Indexing them was made a little easier in that a plural always indicates "flowers".  One text did have a couple cases where "flower" meant "flour" though, which is really awkward because people who search on "flower" don't want to see recipes with "flour" but do want to see recipes with "flowers".

Eles - Almost as much of a pain as "pyk".  Here the many variants (els, elys, etc.) can mean either "eels" or "else".  Again though, I only need to index one of the terms.

Haris - It could be "hairs" or it could be "hares".  Fortunately, not only do I need to index only one of them, but neither one shows up very often.

Dere - This one is minor.  There's only one recipe that uses it in the sense of "dear", the rest are "deer".

Grains - For this one I have a different issue.  "Grains" can mean ... well, grains, like wheat.  Alternately, it could be part of the term "grains of paradise" meaning the seeds of the plant Aframomum melegueta.  Generally the plural always means "grains of paradise" and the singular means "grain".

Even though I'm an incredible word geek, after working on these texts I really do hate these words.  I also have a renewed appreciation for standardized spelling (or "standardised" for those in the UK).