Presents: ObjectRoleModeling.com Thursday, January 08, 2009
 Search
Register Login
Web Log
 
 
  N-ary fact verbalizations  
 
Location: BlogsObjectRoleModeling.com Web LogVisio Tool Tips    
Posted by: Scot Becker 10/20/2004

For any given fact type, there are n! (read: n factorial) readings of that fact type (where n is the number of roles in the fact type). In a unary fact type, there is exactly one reading, in a binary there are two readings, in a ternary there are six readings (3 x 2 x 1), in a quaternary there are 24 readings (4 x 3 x 2 x 1), and so on.

So, consider the fact type "Politician visited Country in Year" as shown below.

This fact type can have up to 6 verbalizations which could be something like:

  1. Politician visited Country in Year
  2. Politician in Year visited Country
  3. Country was visited by Politician in Year
  4. Country in Year was visited by Politician
  5. Year included visit to Country by Politician
  6. Year included visit by Politician in Year

Visio will only display the first reading on the diagram, as shown above, but will allow you to specify a total of n (in this case, 3) readings on the "Readings" tab of the "Database Properties" window for the predicate. However, there is a catch: Visio assumes each reading begins with a different object type. For example, in our fact above, there can be one reading beginning with the first object type, Politician, one reading beginning with the second, Country, and one reading beginning with the third, Year.

For the default reading, using ellipses (...) for object holes will allow Visio to correctly interpret the reading. However, for the alternate readings, you need to tell Visio which object type to include in which position when verbalizing and this is done by annotating the object position number with the percent symbol, as below.

This configuration will produce the following verbalizations for our sample fact type: "Politician visited Country in Year", "Country was visited by Politician in Year", and "Year included visit by Politician to Country".

If you wanted verbalizations number 4 and 5 in our list above, the second and third readings should be entered as "%2 in %3 was visited by %1" and "%3 included visit to %2 by %1" respectively.

If you are the rebellious type and entered "%3 included visit by %1 to %2" for the second reading, the Visio verbalizer would chastise you with "[Invalid reading involving: Year Politician Country]". However, the (devastatingly handsome) makers of the Orthogonal Toolbox hate to see you feel bad; we wrote the tool to correctly create the reading you desired when producing XML Output.

Permalink |  Trackback
 

Note: To comment on a blog post, you must be logged in.

  Search Web Log  
 
 
  Categories  
   
  Archive  
   
  Blog Roll  
   
  Syndication  
   
 
© 2003 - 2009 Orthogonal Software Corporation. All rights reserved. Terms Of Use Privacy Statement