This article, the second of two parts, examines the problems raised by the glut of information available through the web, and how to tame it. It is excerpted from the book Wicked Cool Java, written by Brian D. Eubanks (No Starch Press, 2005; ISBN: 1593270615).
Crawling the Semantic Web, concluded (Page 1 of 5 )
Simply Logical: Lojban, RDF, and the Jorne Project
Lojban (www.lojban.org) is an artificial spoken and written language based on the concepts of predicate logic. While it was designed to be used by human beings, it has a parseable grammar and structured semantics that make it ideal for processing by computers. Lojban defines words based on predefined predicate root words called gismu. Each root word has a specific structure associated with it, containing one to five slots that can be filled with nouns (Lojban calls these items sumti). For example, the Lojban predicate “bevri” means the act or process of carrying something, and it functions much like a verb. Within its structure are also contained five other related concepts: carrier, cargo, delivery-destination, delivery-source, and delivery-path. While in English and most other languages these may be separate words, in Lojban they are references to positions within the bevri structure.
There are over 1,300 root gismu in the Lojban vocabulary, and these structures form a very interesting ontology of their own. Each of them has between one and five slots. Most of the gismu don’t have five slots like bevri does. In fact, there are only a few gismu with five parameters. Table 4-1 shows the number of gismu of each arity, or parameter count, and the total number of slots as of this writing.
Table 4-1: Gismu Count, by Arity
The slots in the root predicates give us 3,500+ base concepts. These can be combined in many different ways by using compound words and logical connectives, but for our purposes here we are looking at the root words only as base concepts. Perhaps you are now wondering, “So what does all this have to do with the Semantic Web?” In an earlier section, we discussed some existing ontologies with built-in relationships that we might use to describe our own entities. Lojban has a convenient set of base concepts that could be used in creating an ontology.
Lojban fits in very well with RDF, which also maps verbs as predicates, although RDF uses graphs of “subject verb object” predicates, and Lojban uses a slot-based approach. There is some mapping required in order to integrate the two, and although it can be done, no standard RDF ontology exists for Lojban—yet. In January 2005, I created an open-source project called Jorne to define standards for combining Lojban with the Semantic Web. Once these standards are complete, the project will release Java software to convert Lojban text to and from RDF triples. One of the goals of this project is for a human to be able to write Lojban text and have the computer automatically convert it into RDF statements for running queries against knowledge bases.
Published ontologies such as SUMO are great for mapping terms from one vocabulary to another, such as in creating dictionaries. The Jorne project is working to map Lojban terms onto well-known vocabularies, so that Lojban documents can share a common semantic space with RDF documents. When the Jorne project completes its first standards, the Jorne project page (www.jorne.org) will hold the latest RDF files along with some sample documents. For creating terms in your own vocabularies, you may want to build upon the SUMO vocabulary, since it is already linked to many others. In Chapter 5, we will discuss a dictionary standard based on English word senses, called WordNet, and a Java API for working with it. WordNet has also been mapped to RDF and SUMO. See this book’s website for more information on these and other ontologies.