name: AnnotationGraph

synopsis:


g++ [flags ...] file ... -l /isip/tools/lib/$ISIP_BINARY/lib_mmedia.a

#include <AnnotationGraph.h>

static boolean diagnose(Integral::DEBUG debug_level);
String getId() const;
boolean setType(String& type);
String getType() const;
boolean get(DoubleLinkedList<Pair<Long, Anchor> >& ancrs, DoubleLinkedList<Triple<Long, Long, Annotation> >& annos);
boolean set(DoubleLinkedList<Pair<Long, Anchor> >& ancrs, DoubleLinkedList<Triple<Long, Long, Annotation> >& annos);
String createAnchor(String& id, float offset, String& unit);
boolean addAnchor(Anchor* ancr);
boolean deleteAnchor(Anchor* ancr);
Anchor* getAnchorById(const String& id);
String createAnnotation(String& id, Anchor* ancr, Anchor* ancr, String& type, long channel = Annotation::DEF_CHANNEL_INDEX);
boolean add(Annotation* anno);
boolean deleteAnnotation(Annotation* anno);
Annotation* getById(const String& id);
boolean setAnchorOffset(Anchor* ancr, float offset);
float getAnchorOffset(Anchor* ancr);
boolean unsetAnchorOffset(Anchor* ancr);
boolean getIncomingAnnotationSet(Anchor* ancr, DoubleLinkedList<Annotation>& annos);
boolean getOutgoingAnnotationSet(Anchor* ancr, DoubleLinkedList<Annotation>& annos);
Anchor* splitAnchor(Anchor* ancr);
Annotation* splitAnnotation(Annotation* anno);
boolean nSplitAnnotation(Annotation* anno, long num_split, DoubleLinkedList<Annotation>& annos);
boolean getAnchorSet(DoubleLinkedList<Anchor>& ancrs);
boolean getAnchorSetByOffset(float offset, DoubleLinkedList<Anchor>& ancrs, double epsilon = DEF_EPSILON);
boolean getAnnotationSetByType(const String& type, DoubleLinkedList<Annotation>& annos);
boolean getAnnotationSetByOffset(float offset, DoubleLinkedList<Annotation>& annos);
boolean getAnnotationSeqByOffset(DoubleLinkedList<Annotation>& annos, float begin = DEF_OFFSET, float end = DEF_OFFSET);
Annotation* getAnnotationByOffset(float offset);
float getNearestOffset(float arg);
boolean getAnchorSetNearestOffset(float offset, DoubleLinkedList<Anchor>& ancrs);
boolean setFeature(String& id, String& fname, String& fvalue);
boolean existsFeature(String& id, String& fmame);
boolean deleteFeature(String& id, String& fname);
String getFeature(String& id, String& fname);
boolean getFeatureNames(String& id, Vector<String>& names);
boolean unsetFeatures(String& id);
boolean setFeature(Annotation* anno, String& fname, String& fvalue);
boolean getAnnotationSetByFeature(const String& feature, const String& value, DoubleLinkedList<Annotation>& annos);
quick start:


Anchor* ancr_00;
Anchor* ancr_01;

String newid_00;
String newid_01;
String newid_02;

Float offset_00(2.4);
Float offset_01(4.9);

String atype_01(L"oh i see uh-huh");
String unit_00(L"seconds");

String gname_01(L"Switchboard");
String gtype_01(L"sw2001A-ms98-a-0001");

AnnotationGraph angr_01(gname_00, gtype_00);

newid_00 = angr_01.createAnchor(gname_01, offset_00, unit_00);
ancr_00 = angr_01.getAnchorById(newid_00);

newid_01 = angr_01.createAnchor(gname_01, offset_01, unit_00);
ancr_01 = angr_01.getAnchorById(newid_01);

newid_02 = angr_01.createAnnotation(gname_01, ancr_00, ancr_01, atype_00);

description:

This class is used to represent a set of annotations with different levels of annotations (sentence, word and phone) of a signal.

dependencies:

public constants:

error codes:

protected data:

required public methods:

class-specific public methods:

private methods:

examples:

notes: