org.shapelogic.machinelearning
Class FFNeuralNetworkWeightsParser

java.lang.Object
  extended by org.shapelogic.machinelearning.FFNeuralNetworkWeightsParser

public class FFNeuralNetworkWeightsParser
extends java.lang.Object

FFNeuralNetworkWeightsParser parses FFNeuralNetworkWeights.
I need a lookahead for the block line.
syntax: BLOCK_START "FEATURES" string + BLOCK_START "RESULTS" string + BLOCK_START [ "PRINTS" string + BLOCK_START ] [ "RULES_PREDICATE" BLOCK_START ( def string (string relation number) * BLOCK_START )* ] ("WEIGHTS" number + BLOCK_START ) * "WEIGHTS" number

Author:
Sami Badawi

Field Summary
protected  java.lang.String _blockLookahead
           
protected  FFNeuralNetworkWeights _nnWeights
           
protected  java.util.Scanner _scanner
           
static java.lang.String BLOCK_START
           
static java.lang.String COMMENT
           
static java.lang.String DEFINITION
           
static java.lang.String FEATURES
           
static java.lang.String PRINTS
           
static java.lang.String RESULTS
           
static java.lang.String RULES_PREDICATE
           
static java.lang.String WEIGHTS
           
 
Constructor Summary
FFNeuralNetworkWeightsParser()
           
 
Method Summary
protected  void blockStart()
           
protected  boolean endOfBlock(java.lang.String lookahead)
           
protected  java.io.Reader open(java.lang.String path)
          Opens URLs as well.
 FFNeuralNetworkWeights parse(java.io.Reader input)
           
 FFNeuralNetworkWeights parse(java.lang.String path)
           
protected  void parseDefinition(java.util.List<RulePredicate> rulePredicates)
           
protected  void parsePredicateRules()
          If there are more type of rules this define what the current type of rules are.
There is not so currently this is empty.
protected  void parseStringList(java.util.List<java.lang.String> outputList)
           
protected  void weights()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BLOCK_START

public static final java.lang.String BLOCK_START
See Also:
Constant Field Values

COMMENT

public static final java.lang.String COMMENT
See Also:
Constant Field Values

DEFINITION

public static final java.lang.String DEFINITION
See Also:
Constant Field Values

FEATURES

public static final java.lang.String FEATURES
See Also:
Constant Field Values

PRINTS

public static final java.lang.String PRINTS
See Also:
Constant Field Values

RESULTS

public static final java.lang.String RESULTS
See Also:
Constant Field Values

RULES_PREDICATE

public static final java.lang.String RULES_PREDICATE
See Also:
Constant Field Values

WEIGHTS

public static final java.lang.String WEIGHTS
See Also:
Constant Field Values

_scanner

protected java.util.Scanner _scanner

_nnWeights

protected FFNeuralNetworkWeights _nnWeights

_blockLookahead

protected java.lang.String _blockLookahead
Constructor Detail

FFNeuralNetworkWeightsParser

public FFNeuralNetworkWeightsParser()
Method Detail

parse

public FFNeuralNetworkWeights parse(java.lang.String path)
                             throws java.lang.Exception
Throws:
java.lang.Exception

open

protected java.io.Reader open(java.lang.String path)
                       throws java.lang.Exception
Opens URLs as well.

Throws:
java.lang.Exception

parse

public FFNeuralNetworkWeights parse(java.io.Reader input)
                             throws com.sun.org.apache.xerces.internal.impl.xpath.regex.ParseException
Throws:
com.sun.org.apache.xerces.internal.impl.xpath.regex.ParseException

blockStart

protected void blockStart()

parseStringList

protected void parseStringList(java.util.List<java.lang.String> outputList)

parsePredicateRules

protected void parsePredicateRules()
                            throws com.sun.org.apache.xerces.internal.impl.xpath.regex.ParseException
If there are more type of rules this define what the current type of rules are.
There is not so currently this is empty.

Throws:
com.sun.org.apache.xerces.internal.impl.xpath.regex.ParseException

parseDefinition

protected void parseDefinition(java.util.List<RulePredicate> rulePredicates)
                        throws com.sun.org.apache.xerces.internal.impl.xpath.regex.ParseException
Throws:
com.sun.org.apache.xerces.internal.impl.xpath.regex.ParseException

endOfBlock

protected boolean endOfBlock(java.lang.String lookahead)
                      throws com.sun.org.apache.xerces.internal.impl.xpath.regex.ParseException
Throws:
com.sun.org.apache.xerces.internal.impl.xpath.regex.ParseException

weights

protected void weights()


Copyright © 2009. All Rights Reserved.