annotool.io
Class LabelReader
java.lang.Object
annotool.io.LabelReader
public class LabelReader
- extends java.lang.Object
Read labels (targets) from a file.
Constructor Summary |
LabelReader(int nsample,
java.util.ArrayList<java.lang.String> annoLabels)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LabelReader
public LabelReader(int nsample,
java.util.ArrayList<java.lang.String> annoLabels)
getTargets
public int[][] getTargets(java.lang.String targetfilename,
java.lang.String[] filenames)
throws java.io.FileNotFoundException,
java.lang.NumberFormatException
- Throws:
java.io.FileNotFoundException
java.lang.NumberFormatException
getAnnotations
public java.util.ArrayList<java.lang.String> getAnnotations()
throws java.lang.Exception
- Throws:
java.lang.Exception
getClassnames
public java.util.HashMap<java.lang.String,java.lang.String> getClassnames()
throws java.lang.Exception
- Throws:
java.lang.Exception
getNumOfAnnotations
public int getNumOfAnnotations()
getNumOfClasses
public int getNumOfClasses()
calNumOfClasses
public java.util.ArrayList<java.lang.Integer> calNumOfClasses(int[][] targets)
infoNumOfClasses
public static int infoNumOfClasses(int[] targets)