jcreek.examples
Class ModellingTutorial

java.lang.Object
  extended byjcreek.examples.ModellingTutorial

public class ModellingTutorial
extends java.lang.Object

Source code for "Programmers Guide – modelling and matching".

Title: ModelligTutoral

Description: Contains the code described in the written tutorial. This file is unnaturaly fragmented by coding standards, but this breaks the process down into stages which can be taken stepwise (as documented in the tutorial), and therby experimented with.

Copyright: Copyright (c) 2004

Company: NTNU

Version:
1.0
Author:
Stein Brandser

Constructor Summary
ModellingTutorial()
           
 
Method Summary
static void addAttributesAndCases(java.lang.String[] args)
          Simply a wrapper to CreekExample.addAttributes(km) and addCases(km).
static void doAll(java.lang.String[] args)
          Run an experiment with relation strength and/or causal model.
static void doMatch(java.lang.String[] args)
           
protected static java.lang.String getFileName(java.lang.String[] args)
          Extract and return first argument, or default, from a String array.
static void launchBrowser(java.lang.String[] args)
           
protected static KnowledgeModel loadKmFromFile(java.lang.String filename, java.lang.String cmd)
          Load knowledge model from file successfully or exit program.
static void main(java.lang.String[] args)
          Parse the command line for arguments, run the corresponding method.
protected static boolean mayOverwrite(java.lang.String filename)
           
static void newKM(java.lang.String[] args)
           
protected static void showMissingFileHint(java.lang.Exception e, java.lang.String cmd)
          Give recovery feedback to user, call it from caught FileNotFoundExceptions.
protected static void theActualMatching(KnowledgeModel km)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModellingTutorial

public ModellingTutorial()
Method Detail

main

public static void main(java.lang.String[] args)
Parse the command line for arguments, run the corresponding method.

Parameters:
args - String[] command line

launchBrowser

public static void launchBrowser(java.lang.String[] args)

getFileName

protected static java.lang.String getFileName(java.lang.String[] args)
Extract and return first argument, or default, from a String array.

Returns:
String

showMissingFileHint

protected static void showMissingFileHint(java.lang.Exception e,
                                          java.lang.String cmd)
Give recovery feedback to user, call it from caught FileNotFoundExceptions.

Parameters:
e - Exception
cmd - String

loadKmFromFile

protected static KnowledgeModel loadKmFromFile(java.lang.String filename,
                                               java.lang.String cmd)
Load knowledge model from file successfully or exit program.

Parameters:
filename - String
Returns:
KnowledgeModel

mayOverwrite

protected static boolean mayOverwrite(java.lang.String filename)
                               throws java.io.IOException
Throws:
java.io.IOException

newKM

public static void newKM(java.lang.String[] args)

addAttributesAndCases

public static void addAttributesAndCases(java.lang.String[] args)
Simply a wrapper to CreekExample.addAttributes(km) and addCases(km).

Parameters:
args - String[], args[1] contains the filename of the km to load.
See Also:
CreekExample.addCarDomainToModel

doMatch

public static void doMatch(java.lang.String[] args)

theActualMatching

protected static void theActualMatching(KnowledgeModel km)

doAll

public static void doAll(java.lang.String[] args)
Run an experiment with relation strength and/or causal model. The color attribute is made very important with -s. A causal model is added to the knowledge base with -c.

Parameters:
args - String[]


Created at IDI, NTNU by the Artificial Intelligence and Learning group