Take the slow train out of Leeds and head west, past Halifax. Just before you leave Yorkshire for Lancashire, you’ll find a picturesque village called Mytholmroyd – which you should pronounce like thyroid, not mistletoe.

Climb the steep hill by the Methodist chapel, walk past the old weavers’ cottages and you’ll see a long, low building that was designed for hatching poultry – though all remaining chickens have long since flown the roost. Enter The Hatchery – as the building is still called – and, pecking away at computer keyboards, you’ll find batteries of lawyers.

From these homely, open-plan rooms – which remind me of newspaper offices before the designers got to work on them – the global publisher Thomson Reuters produces Westlaw UK, its hi-tech legal information service. Cases, legislation and articles come in at one end of virtual food-chain; they’re digested by experts; and a fully searchable legal resource emerges on computer screens around the common-law world.

Sweet & Maxwell spent three years hatching its online service here in conditions of some secrecy before launching it in 2000 as a rival to the LexisNexis Butterworths service, now called LexisLibrary. The two publishers compete to offer subscribers the most up-to-date law reports and the best-annotated statutes.

Ignorance of the law may be no defence, but it strikes me that anyone going to law without access to services such as these must be at a major disadvantage. There is a public website that carries recent judgments but it cannot help you find all the cases on a particular point of law; statutes are now published online, but the general public has no reliable way of telling which provisions are now in force or what the law was on any given day in the past.

Why, though, Mytholmroyd? It all began in 1986, when two librarians decided to base their new business a few miles away, up on the ‘tops’ above Hebden Bridge. Spotting a gap in the market, Nigel Smith and Christine Miskin started to index each article published in every legal journal in the United Kingdom. By looking up a term in their index, a subscriber could find everything that had been published on a particular area of the law that month.

To make this work, Smith and Miskin needed a standardised way of describing legal concepts. The two librarians set about devising a list of legal terms, arranged hierarchically. Start with torts, Smith explains, and one subdivision would be negligence; below that would come professional negligence; a further subdivision would be clinical negligence; and so on.

‘If we were indexing an article about the duty of care owed by solicitors to the beneficiaries of wills, we might assign the key words "beneficiaries", "duty of care", "professional negligence", "solicitors" and "wills",’ he tells me, instinctively speaking in alphabetical order. A search under any one of them would lead to the article.

Smith and his business partner brought in software developers, outgrew their premises and moved down the hill to Mytholmroyd. In 1996, their company was bought by Sweet & Maxwell – which recognised that its specialised database skills could form the basis of Westlaw UK. Many of the lawyers and programmers who built the new service a decade ago are still working there. One told me they stay in the area ‘because it’s such a fantastic place to live’.

Smith and Miskin originally called their list of legal terms a thesaurus, although it’s now known as a taxonomy – a concept borrowed from biological classification. One limitation of their original design was that each term could be used in only one category – for example, if ‘duress’ appeared under contracts it could not also appear under criminal law. Re-programming this was much harder than it might seem.

But it’s also important to avoid synonyms; if a concept can be categorised under more than one heading, you might need to make two searches before you could find it. So the Sweet & Maxwell taxonomy has a long list of banned phrases. Some of these may seem arbitrary; it prefers ‘contract of employment’ to ‘employment contract’, and tells indexers to use ‘strict liability’ instead of ‘absolute offence’. A committee decides when new phrases can be admitted: has ‘HMRC’ caught on yet or should it still be ‘Revenue and Customs’?

‘Our taxonomy is the most comprehensive in the industry and is applied uniquely across all of our content, from printed books to news, cases and legislation,’ says Mark Seaman, vice president, editorial and production, at Sweet & Maxwell.

And that’s the beauty of it. Browse through a learned journal such as Public Law and you will notice half a dozen phrases printed at the head of every article. Type most or all of those terms into a Westlaw search and it should bring up other articles on the same topic, together with new legislation and relevant cases decided since the article was written. Search against the keywords that appear in a Westlaw case digest and – as well as subsequent cases – you should find articles on the subject, including some that may not even mention the case.

Sweet & Maxwell’s attempt to compete with Halsbury’s Laws, the Butterworths encyclopaedia that celebrated its centenary two years ago, ended in disaster when the sole copy of its manuscript was fire-bombed in the Blitz. But Smith believes that his taxonomy has come to the rescue. ‘We can now rebuild the encyclopaedia that was lost in 1941 because customers can access it using a controlled vocabulary. It’s a giant index to all of our content.’

I wait to see whether Westlaw will now index this article under ‘poultry, hatchery, phoenix’.

joshua@rozenberg.net