OpenGrok
Home
Sort by relevance
Sort by last modified time
Full Search
Definition
Symbol
File Path
History
|
|
Help
Searched
refs:PtNode
(Results
1 - 14
of
14
) sorted by null
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/makedict/
DictEncoder.java
20
import com.android.inputmethod.latin.makedict.FusionDictionary.
PtNode
;
36
public void writePtNode(final
PtNode
ptNode
, final int parentPosition,
FusionDictionary.java
48
ArrayList<
PtNode
> mData;
61
mData = new ArrayList<
PtNode
>();
63
public PtNodeArray(ArrayList<
PtNode
> data) {
96
*
PtNode
is a group of characters, with a frequency, shortcut targets, bigrams, and children
99
* This is the central class of the in-memory representation. A
PtNode
is what can
101
* same time. A
PtNode
essentially represents one or several characters in the middle
103
* In this in-memory representation, whether the
PtNode
is a terminal or not is represented
108
public static final class
PtNode
{
124
int mCachedSize; // The size, in bytes, of this
PtNode
.
125
int mCachedAddressBeforeUpdate; // The address of this
PtNode
(before update
[
all
...]
BinaryDictEncoderUtils.java
21
import com.android.inputmethod.latin.makedict.FusionDictionary.
PtNode
;
69
* Compute the binary size of the character array in a
PtNode
74
* @param
ptNode
the
PtNode
77
private static int getPtNodeCharactersSize(final
PtNode
ptNode
) {
78
return getPtNodeCharactersSize(
ptNode
.mChars);
82
* Compute the binary size of the
PtNode
count for a node array.
84
* @return the size of the
PtNode
count, either 1 or 2 bytes.
121
* Compute the maximum size of a
PtNode
, assuming 3-byte addresses for everything
[
all
...]
Ver3DictEncoder.java
21
import com.android.inputmethod.latin.makedict.FusionDictionary.
PtNode
;
84
// the order of the
PtNode
arrays becomes a quite complicated problem, because though the
95
MakedictLog.i("Checking
PtNode
array...");
138
private void writePtNodeFlags(final
PtNode
ptNode
, final FormatOptions formatOptions) {
139
final int childrenPos = BinaryDictEncoderUtils.getChildrenPosition(
ptNode
, formatOptions);
141
BinaryDictEncoderUtils.makePtNodeFlags(
ptNode
, childrenPos, formatOptions),
145
private void writeParentPosition(final int parentPosition, final
PtNode
ptNode
,
152
parentPosition -
ptNode
.mCachedAddressAfterUpdate, formatOptions)
[
all
...]
Ver4DictEncoder.java
25
import com.android.inputmethod.latin.makedict.FusionDictionary.
PtNode
;
175
final
PtNode
target =
301
for (final
PtNode
node : array.mData) {
363
private void writePtNodeFlags(final
PtNode
ptNode
, final FormatOptions formatOptions) {
364
final int childrenPos = BinaryDictEncoderUtils.getChildrenPosition(
ptNode
, formatOptions);
366
BinaryDictEncoderUtils.makePtNodeFlags(
ptNode
, childrenPos, formatOptions),
370
private void writeParentPosition(int parentPos, final
PtNode
ptNode
,
373
parentPos -=
ptNode
.mCachedAddressAfterUpdate
[
all
...]
BinaryDictDecoderUtils.java
22
import com.android.inputmethod.latin.makedict.FusionDictionary.
PtNode
;
323
* Reads and returns the
PtNode
count out of a buffer and forwards the pointer.
449
final Map<Integer,
PtNode
> reversePtNodeMap, final FormatOptions options)
451
final ArrayList<
PtNode
> nodeArrayContents = new ArrayList<
PtNode
>();
458
for (int i = count; i > 0; --i) { // Scan the array of
PtNode
.
484
new
PtNode
(info.mCharacters, shortcutTargets, bigrams,
490
new
PtNode
(info.mCharacters, shortcutTargets, bigrams,
558
Map<Integer,
PtNode
> reversePtNodeMapping = new TreeMap<Integer,
PtNode
>();
[
all
...]
Ver3DictDecoder.java
24
import com.android.inputmethod.latin.makedict.FusionDictionary.
PtNode
;
150
frequency =
PtNode
.NOT_A_TERMINAL;
172
throw new RuntimeException("Too many bigrams in a
PtNode
(" + bigrams.size()
267
throw new RuntimeException("Too many bigrams in a
PtNode
.");
Ver4DictDecoder.java
24
import com.android.inputmethod.latin.makedict.FusionDictionary.
PtNode
;
228
terminalId =
PtNode
.NOT_A_TERMINAL;
235
frequency =
PtNode
.NOT_A_TERMINAL;
263
throw new RuntimeException("Too many bigrams in a
PtNode
(" + bigrams.size()
BinaryDictIOUtils.java
25
import com.android.inputmethod.latin.makedict.FusionDictionary.
PtNode
;
108
&& info.mFrequency != FusionDictionary.
PtNode
.NOT_A_TERMINAL) {// found word
129
// The
Ptnode
array has more PtNodes.
162
* Gets the address of the last
PtNode
of the exact matching word in the dictionary.
207
// found the
PtNode
matches the word.
209
if (currentInfo.mFrequency ==
PtNode
.NOT_A_TERMINAL
226
// If we found the next
PtNode
, it is under the file pointer.
333
* Write a
PtNode
to an output stream from a PtNodeInfo.
334
* A
PtNode
is an in-memory representation of a node in the patricia trie.
335
* A
PtNode
info is a container for low-level information about how th
[
all
...]
/packages/inputmethods/LatinIME/tools/dicttool/tests/com/android/inputmethod/latin/makedict/
FusionDictionaryTest.java
20
import com.android.inputmethod.latin.makedict.FusionDictionary.
PtNode
;
75
final
PtNode
ptNode
= FusionDictionary.findWordInTree(dict.mRootNodeArray, word);
76
assertNotNull(
ptNode
);
/packages/inputmethods/LatinIME/tools/dicttool/src/com/android/inputmethod/latin/dicttool/
Info.java
21
import com.android.inputmethod.latin.makedict.FusionDictionary.
PtNode
;
68
final
PtNode
ptNode
= FusionDictionary.findWordInTree(dict.mRootNodeArray, word);
69
if (null ==
ptNode
) {
74
System.out.println(" Freq: " +
ptNode
.getFrequency());
75
if (
ptNode
.getIsNotAWord()) {
78
if (
ptNode
.getIsBlacklistEntry()) {
81
final ArrayList<WeightedString> shortcutTargets =
ptNode
.getShortcutTargets();
91
final ArrayList<WeightedString> bigrams =
ptNode
.getBigrams();
Diff.java
20
import com.android.inputmethod.latin.makedict.FusionDictionary.
PtNode
;
124
final
PtNode
word1 = FusionDictionary.findWordInTree(dict1.mRootNodeArray,
154
final
PtNode
word0 = FusionDictionary.findWordInTree(dict0.mRootNodeArray,
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/utils/
UserHistoryDictIOUtilsTests.java
28
import com.android.inputmethod.latin.makedict.FusionDictionary.
PtNode
;
92
final
PtNode
ptNode
= FusionDictionary.findWordInTree(dict.mRootNodeArray, word);
93
assertNotNull(
ptNode
);
94
assertTrue(
ptNode
.isTerminal());
97
assertNotNull(
ptNode
.getBigram(bigram));
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/makedict/
BinaryDictDecoderEncoderTests.java
30
import com.android.inputmethod.latin.makedict.FusionDictionary.
PtNode
;
213
final
PtNode
ptNode
= FusionDictionary.findWordInTree(dict.mRootNodeArray, word);
214
assertNotNull(
ptNode
);
221
final
PtNode
ptNode
= FusionDictionary.findWordInTree(dict.mRootNodeArray,
223
assertNotNull(words.get(w1) + "," + words.get(w2),
ptNode
.getBigram(words.get(w2)));
231
final
PtNode
ptNode
= FusionDictionary.findWordInTree(dict.mRootNodeArray,
235
ptNode
.getShortcut(word))
[
all
...]
Completed in 90 milliseconds