am f144cc61: Merge "Step 24-A remove setdict" into jb-mr1-dev
* commit 'f144cc61cc9b704f890ad703c5220c3eed891743': Step 24-A remove setdictmain
commit
8db85a419e
|
@ -47,8 +47,6 @@ Dictionary::Dictionary(void *dict, int dictSize, int mmapFd, int dictBufAdjust,
|
||||||
fullWordMultiplier, maxWordLength, maxWords, options);
|
fullWordMultiplier, maxWordLength, maxWords, options);
|
||||||
mBigramDictionary = new BigramDictionary(mOffsetDict, maxWordLength, maxPredictions);
|
mBigramDictionary = new BigramDictionary(mOffsetDict, maxWordLength, maxPredictions);
|
||||||
mGestureDecoder = new GestureDecoderWrapper(maxWordLength, maxWords);
|
mGestureDecoder = new GestureDecoderWrapper(maxWordLength, maxWords);
|
||||||
mGestureDecoder->setDict(mUnigramDictionary, mBigramDictionary,
|
|
||||||
mOffsetDict /* dict root */, 0 /* root pos */);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Dictionary::~Dictionary() {
|
Dictionary::~Dictionary() {
|
||||||
|
|
|
@ -48,14 +48,6 @@ class GestureDecoderWrapper : public IncrementalDecoderInterface {
|
||||||
inputSize, commitPoint, outWords, frequencies, outputIndices, outputTypes);
|
inputSize, commitPoint, outWords, frequencies, outputIndices, outputTypes);
|
||||||
}
|
}
|
||||||
|
|
||||||
void setDict(const UnigramDictionary *dict, const BigramDictionary *bigram,
|
|
||||||
const uint8_t *dictRoot, int rootPos) {
|
|
||||||
if (!mIncrementalDecoderInterface) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
mIncrementalDecoderInterface->setDict(dict, bigram, dictRoot, rootPos);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void setGestureDecoderFactoryMethod(
|
static void setGestureDecoderFactoryMethod(
|
||||||
IncrementalDecoderInterface *(*factoryMethod)(int, int)) {
|
IncrementalDecoderInterface *(*factoryMethod)(int, int)) {
|
||||||
sGestureDecoderFactoryMethod = factoryMethod;
|
sGestureDecoderFactoryMethod = factoryMethod;
|
||||||
|
|
|
@ -32,8 +32,6 @@ class IncrementalDecoderInterface {
|
||||||
int *inputXs, int *inputYs, int *times, int *pointerIds, int *codes,
|
int *inputXs, int *inputYs, int *times, int *pointerIds, int *codes,
|
||||||
int inputSize, int commitPoint, unsigned short *outWords, int *frequencies,
|
int inputSize, int commitPoint, unsigned short *outWords, int *frequencies,
|
||||||
int *outputIndices, int *outputTypes) = 0;
|
int *outputIndices, int *outputTypes) = 0;
|
||||||
virtual void setDict(const UnigramDictionary *dict, const BigramDictionary *bigram,
|
|
||||||
const uint8_t *dictRoot, int rootPos) = 0;
|
|
||||||
IncrementalDecoderInterface() { };
|
IncrementalDecoderInterface() { };
|
||||||
virtual ~IncrementalDecoderInterface() { };
|
virtual ~IncrementalDecoderInterface() { };
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -48,14 +48,6 @@ class IncrementalDecoderWrapper : public IncrementalDecoderInterface {
|
||||||
inputSize, commitPoint, outWords, frequencies, outputIndices, outputTypes);
|
inputSize, commitPoint, outWords, frequencies, outputIndices, outputTypes);
|
||||||
}
|
}
|
||||||
|
|
||||||
void setDict(const UnigramDictionary *dict, const BigramDictionary *bigram,
|
|
||||||
const uint8_t *dictRoot, int rootPos) {
|
|
||||||
if (!mIncrementalDecoderInterface) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
mIncrementalDecoderInterface->setDict(dict, bigram, dictRoot, rootPos);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void setIncrementalDecoderFactoryMethod(
|
static void setIncrementalDecoderFactoryMethod(
|
||||||
IncrementalDecoderInterface *(*factoryMethod)(int, int)) {
|
IncrementalDecoderInterface *(*factoryMethod)(int, int)) {
|
||||||
sIncrementalDecoderFactoryMethod = factoryMethod;
|
sIncrementalDecoderFactoryMethod = factoryMethod;
|
||||||
|
|
Loading…
Reference in New Issue