org.shapelogic.machinelearning
Class FFNeuralNetworkWeightsParser
java.lang.Object
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
FFNeuralNetworkWeightsParser
public FFNeuralNetworkWeightsParser()
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.