|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.mit.sketch.chem.ChemClassifier
public class ChemClassifier
| Field Summary | |
|---|---|
int |
backtrack
|
double |
bondLength
|
java.lang.String |
chempath
|
boolean |
classifyBonds
|
java.util.List<StrokeGroup> |
combinedGroups
|
StrokeGroup[] |
forcedGroups
|
java.lang.String[] |
interpretations
|
boolean |
learnBonds
|
java.util.ArrayList<java.lang.Double> |
lineerrors
|
java.util.ArrayList<java.lang.Double> |
polyerrors
|
java.util.ArrayList<Polygon> |
polygons
|
java.util.ArrayList<java.lang.Double> |
polymaxerrors
|
int |
recwindow
|
java.util.List<StrokeGroup> |
strokeGroups
|
java.util.List<StrokeData> |
strokes
|
boolean |
template
|
java.lang.String |
trainFile
|
StrokeGroup |
tryGroup
|
boolean |
verbose
|
| Constructor Summary | |
|---|---|
ChemClassifier()
|
|
| Method Summary | |
|---|---|
java.util.List<StrokeGroup> |
alternatives(StrokeGroup sg)
|
double |
avgScore()
|
StrokeGroup |
bestCandidate(int index)
|
double |
bestCandidateProb(int index)
|
double |
calculateBondLength()
Approximate the average length of bonds in the sketch |
void |
classify(boolean incremental)
|
Candidate[][] |
combineCandidateMatrices(Candidate[][] c1,
Candidate[][] c2)
|
void |
combineGroups()
|
void |
forceInterpretation(StrokeGroup sg)
|
void |
interpretCandidates(int startstroke)
|
void |
interpretLabels(java.lang.String[] labels)
|
void |
interpretStrokes()
Initial interpretation of special objects such as wedge and hash bonds |
boolean |
isHashBond(java.util.List<StrokeData> strokes,
int i,
int s)
Check whether a sequence of strokes seems like a hashed bond |
boolean |
isWedgeBond(StrokeData sd1)
Check whether a sequence of strokes seems like a wedge bond |
void |
loadTrainFile(java.lang.String drsFile)
|
double |
localScore(StrokeGroup sg)
|
void |
makeHeader()
|
boolean |
overlapGroup(StrokeGroup sg1,
StrokeGroup sg2)
|
void |
polyFit(boolean incremental)
Generate polygonal approximations for all strokes |
void |
reInterpret()
|
void |
reset(boolean complete)
|
void |
resetTrainFile()
|
void |
restoreInterpretation(StrokeGroup sg)
|
void |
restoreInterpretations()
|
void |
setStrokes(java.util.ArrayList<StrokeData> newstrokes)
|
void |
setTrainFile(java.lang.String drsFile)
|
double |
standardize(double val,
double scale)
Standardize based on average bond length |
void |
train(java.lang.String labelfile,
boolean append)
|
void |
tryInterpretation(StrokeGroup sg)
|
void |
unTry()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public java.util.ArrayList<Polygon> polygons
public java.util.ArrayList<java.lang.Double> polyerrors
public java.util.ArrayList<java.lang.Double> lineerrors
public java.util.ArrayList<java.lang.Double> polymaxerrors
public double bondLength
public java.lang.String[] interpretations
public java.util.List<StrokeData> strokes
public java.util.List<StrokeGroup> strokeGroups
public java.util.List<StrokeGroup> combinedGroups
public StrokeGroup[] forcedGroups
public StrokeGroup tryGroup
public boolean learnBonds
public boolean classifyBonds
public boolean verbose
public int backtrack
public int recwindow
public java.lang.String chempath
public java.lang.String trainFile
public boolean template
| Constructor Detail |
|---|
public ChemClassifier()
| Method Detail |
|---|
public void setStrokes(java.util.ArrayList<StrokeData> newstrokes)
public void resetTrainFile()
public void setTrainFile(java.lang.String drsFile)
public void loadTrainFile(java.lang.String drsFile)
public void makeHeader()
public void train(java.lang.String labelfile,
boolean append)
public void classify(boolean incremental)
public Candidate[][] combineCandidateMatrices(Candidate[][] c1,
Candidate[][] c2)
public void reInterpret()
public void interpretCandidates(int startstroke)
public void interpretLabels(java.lang.String[] labels)
public void combineGroups()
public StrokeGroup bestCandidate(int index)
public double bestCandidateProb(int index)
public double localScore(StrokeGroup sg)
public boolean overlapGroup(StrokeGroup sg1,
StrokeGroup sg2)
public java.util.List<StrokeGroup> alternatives(StrokeGroup sg)
public double avgScore()
public void tryInterpretation(StrokeGroup sg)
public void unTry()
public void forceInterpretation(StrokeGroup sg)
public void restoreInterpretation(StrokeGroup sg)
public void restoreInterpretations()
public void interpretStrokes()
public boolean isHashBond(java.util.List<StrokeData> strokes,
int i,
int s)
public boolean isWedgeBond(StrokeData sd1)
public double calculateBondLength()
public void polyFit(boolean incremental)
public double standardize(double val,
double scale)
public void reset(boolean complete)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||