EasyCV
0.9.36
Easy! Computer Vision
|
Private Member Functions | |
Corpus | openCorpus (cvac::FilePath file) |
void | closeCorpus (Corpus corp) |
void | saveCorpus (Corpus corp, cvac::FilePath file) |
bool | getDataSetRequiresLocalMirror (Corpus corp) |
bool | localMirrorExists (Corpus corp) |
void | createLocalMirror (Corpus corp, Ice::Identity cb) |
cvac::LabelableList | getDataSet (Corpus corp) |
void | addLabelable (Corpus corp, cvac::LabelableList addme) |
Corpus | createCorpus (cvac::DirectoryPath dir) |
Handles download, mirror, extraction, modification of a Corpus. Corpus data items and functions are separated into "class Corpus" and "interface CorpusService" for two reasons: 1) ICE has to create fewer proxy classes, and 2) only one CorpusService has to run and can deal with many corpora.
Construction of a new Corpus can be accomplished through editing of a property file which contains all relevant information or through the createCorpus method which parses a few common file structures.
A single CorpusService instance generally runs alongside the client code, but in the case of a remote Corpus, that instance might talk to other CorpusService instances running on remote machines. The client should never have to deal with a remote Corpus directly.
|
private |
|
private |
A corpus, once opened, is cached in the CorpusService and does not update itself if the file system or properties file change. To re-open the corpus and re-load the cache, close it first. Otherwise, closing is optional.
|
private |
|
private |
Download, extract, and keep caller informed via CorpusCallback. A mirror can contain the actual files or just enough metadata about the files so as to construct a LabelableList. The callback adapter (cb) must be of type CorpusCallback.
|
private |
Obtain the actual data items in the corpus. This will fail if the Corpus isImmutableMirror and createLocalMirror has not been completed.
|
private |
Does this Corpus require a "download" before the meta data can be obtained?
|
private |
Has a local mirror already been created? This will return true only if this corpus requires a download, not for one that is local to begin with.
|
private |
|
private |
Write Corpus to a metadata file.