| Chunk |
|---|
| Conflicting content |
|---|
len++;
}
if (len > 0) {
<<<<<<< HEAD
callback.addWord(mOutputChars, start, len, mFrequencies[j], mDicTypeId);
=======
callback.addWord(mOutputChars, start, len, mFrequencies[j], DataType.UNIGRAM);
>>>>>>> 2a118d844e0b7dd3e01f25e937b02b05711768a6
}
}
} |
| Solution content |
|---|
len++;
}
if (len > 0) {
callback.addWord(mOutputChars, start, len, mFrequencies[j], mDicTypeId, DataType.UNIGRAM);
}
}
} |
| File |
|---|
| BinaryDictionary.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
* @param wordLength length of valid characters in the character array
* @param frequency the frequency of occurence. This is normalized between 1 and 255, but
* can exceed those limits
<<<<<<< HEAD
* @param dicTypeId of the dictionary where word was from
* @return true if the word was added, false if no more words are required
*/
boolean addWord(char[] word, int wordOffset, int wordLength, int frequency, int dicTypeId);
=======
* @param dataType tells type of this data
* @return true if the word was added, false if no more words are required
*/
boolean addWord(char[] word, int wordOffset, int wordLength, int frequency,
DataType dataType);
>>>>>>> 2a118d844e0b7dd3e01f25e937b02b05711768a6
}
/** |
| Solution content |
|---|
* @param wordLength length of valid characters in the character array
* @param frequency the frequency of occurence. This is normalized between 1 and 255, but
* can exceed those limits
* @param dicTypeId of the dictionary where word was from
* @param dataType tells type of this data
* @return true if the word was added, false if no more words are required
*/
boolean addWord(char[] word, int wordOffset, int wordLength, int frequency, int dicTypeId,
DataType dataType);
}
/** |
| File |
|---|
| Dictionary.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Comment |
| Method interface |
| Chunk |
|---|
| Conflicting content |
|---|
if (completion) {
word[depth] = c;
if (terminal) {
<<<<<<< HEAD
if (!callback.addWord(word, 0, depth + 1, freq * snr, mDicTypeId)) {
=======
if (!callback.addWord(word, 0, depth + 1, freq * snr, DataType.UNIGRAM)) {
>>>>>>> 2a118d844e0b7dd3e01f25e937b02b05711768a6
return;
}
// Add to frequency of next letters for predictive correction |
| Solution content |
|---|
if (completion) {
word[depth] = c;
if (terminal) {
if (!callback.addWord(word, 0, depth + 1, freq * snr, mDicTypeId,
DataType.UNIGRAM)) {
return;
}
// Add to frequency of next letters for predictive correction |
| File |
|---|
| ExpandableDictionary.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| If statement |
| Chunk |
|---|
| Conflicting content |
|---|
|| !same(word, depth + 1, codes.getTypedWord())) {
int finalFreq = freq * snr * addedAttenuation;
if (skipPos < 0) finalFreq *= FULL_WORD_FREQ_MULTIPLIER;
<<<<<<< HEAD
callback.addWord(word, 0, depth + 1, finalFreq, mDicTypeId);
=======
callback.addWord(word, 0, depth + 1, finalFreq,
DataType.UNIGRAM);
>>>>>>> 2a118d844e0b7dd3e01f25e937b02b05711768a6
}
}
if (children != null) { |
| Solution content |
|---|
|| !same(word, depth + 1, codes.getTypedWord())) {
int finalFreq = freq * snr * addedAttenuation;
if (skipPos < 0) finalFreq *= FULL_WORD_FREQ_MULTIPLIER;
callback.addWord(word, 0, depth + 1, finalFreq, mDicTypeId,
DataType.UNIGRAM);
}
}
if (children != null) { |
| File |
|---|
| ExpandableDictionary.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
// TODO: Uncomment this block when we enable re-editing feature
// If a word is selected
<<<<<<< HEAD
/*if ((candidatesStart == candidatesEnd || newSelStart != oldSelStart)
=======
if (isPredictionOn() && mJustRevertedSeparator == null
&& (candidatesStart == candidatesEnd || newSelStart != oldSelStart)
>>>>>>> 2a118d844e0b7dd3e01f25e937b02b05711768a6
&& (newSelStart < newSelEnd - 1 || (!mPredicting))
&& !mVoiceInputHighlighted) {
if (isCursorTouchingWord() || mLastSelectionStart < mLastSelectionEnd) { |
| Solution content |
|---|
// TODO: Uncomment this block when we enable re-editing feature
// If a word is selected
/*if (isPredictionOn() && mJustRevertedSeparator == null
&& (candidatesStart == candidatesEnd || newSelStart != oldSelStart)
&& (newSelStart < newSelEnd - 1 || (!mPredicting))
&& !mVoiceInputHighlighted) {
if (isCursorTouchingWord() || mLastSelectionStart < mLastSelectionEnd) { |
| File |
|---|
| LatinIME.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Comment |
| If statement |
| Chunk |
|---|
| Conflicting content |
|---|
}
private List |
| Solution content |
|---|
}
private List |
| File |
|---|
| LatinIME.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
}
private void showSuggestions(WordComposer word) {
<<<<<<< HEAD
List |
| Solution content |
|---|
}
private void showSuggestions(WordComposer word) {
//long startTime = System.currentTimeMillis(); // TIME MEASUREMENT!
// TODO Maybe need better way of retrieving previous word
CharSequence prevWord = EditingUtil.getPreviousWord(getCurrentInputConnection());
List |
| File |
|---|
| LatinIME.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Comment |
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
* @return list of suggestions.
*/
public List |
| Solution content |
|---|
* @return list of suggestions.
*/
public List |
| File |
|---|
| Suggest.java |
| Developer's decision |
|---|
| Combination |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
mLowerOriginalWord = "";
}
<<<<<<< HEAD
// Search the dictionary only if there are at least 2 characters
if (wordComposer.size() > 1) {
=======
if (wordComposer.size() == 1 && (mCorrectionMode == CORRECTION_FULL_BIGRAM
|| mCorrectionMode == CORRECTION_BASIC)) {
// At first character, just get the bigrams
Arrays.fill(mBigramPriorities, 0);
collectGarbage(mBigramSuggestions, mPrefMaxBigrams);
if (!TextUtils.isEmpty(prevWordForBigram)) {
CharSequence lowerPrevWord = prevWordForBigram.toString().toLowerCase();
if (mMainDict.isValidWord(lowerPrevWord)) {
prevWordForBigram = lowerPrevWord;
}
mMainDict.getBigrams(wordComposer, prevWordForBigram, this,
mNextLettersFrequencies);
char currentChar = wordComposer.getTypedWord().charAt(0);
int count = 0;
int bigramSuggestionSize = mBigramSuggestions.size();
for (int i = 0; i < bigramSuggestionSize; i++) {
if (mBigramSuggestions.get(i).charAt(0) == currentChar) {
int poolSize = mStringPool.size();
StringBuilder sb = poolSize > 0 ?
(StringBuilder) mStringPool.remove(poolSize - 1)
: new StringBuilder(Dictionary.MAX_WORD_LENGTH);
sb.setLength(0);
sb.append(mBigramSuggestions.get(i));
mSuggestions.add(count++, sb);
if (count > mPrefMaxSuggestions) break;
}
}
}
} else if (wordComposer.size() > 1) {
// Search the dictionary only if there are at least 2 characters
>>>>>>> 2a118d844e0b7dd3e01f25e937b02b05711768a6
if (mUserDictionary != null || mContactsDictionary != null) {
if (mUserDictionary != null) {
mUserDictionary.getWords(wordComposer, this, mNextLettersFrequencies); |
| Solution content |
|---|
mLowerOriginalWord = "";
}
// Search the dictionary only if there are at least 2 characters
if (wordComposer.size() == 1 && (mCorrectionMode == CORRECTION_FULL_BIGRAM
|| mCorrectionMode == CORRECTION_BASIC)) {
// At first character, just get the bigrams
Arrays.fill(mBigramPriorities, 0);
collectGarbage(mBigramSuggestions, mPrefMaxBigrams);
if (!TextUtils.isEmpty(prevWordForBigram)) {
CharSequence lowerPrevWord = prevWordForBigram.toString().toLowerCase();
if (mMainDict.isValidWord(lowerPrevWord)) {
prevWordForBigram = lowerPrevWord;
}
mMainDict.getBigrams(wordComposer, prevWordForBigram, this,
mNextLettersFrequencies);
char currentChar = wordComposer.getTypedWord().charAt(0);
int count = 0;
int bigramSuggestionSize = mBigramSuggestions.size();
for (int i = 0; i < bigramSuggestionSize; i++) {
if (mBigramSuggestions.get(i).charAt(0) == currentChar) {
int poolSize = mStringPool.size();
StringBuilder sb = poolSize > 0 ?
(StringBuilder) mStringPool.remove(poolSize - 1)
: new StringBuilder(Dictionary.MAX_WORD_LENGTH);
sb.setLength(0);
sb.append(mBigramSuggestions.get(i));
mSuggestions.add(count++, sb);
if (count > mPrefMaxSuggestions) break;
}
}
}
} else if (wordComposer.size() > 1) {
// Search the dictionary only if there are at least 2 characters
if (mUserDictionary != null || mContactsDictionary != null) {
if (mUserDictionary != null) {
mUserDictionary.getWords(wordComposer, this, mNextLettersFrequencies); |
| File |
|---|
| Suggest.java |
| Developer's decision |
|---|
| Combination |
| Kind of conflict |
|---|
| Comment |
| If statement |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
return false;
}
<<<<<<< HEAD
public boolean addWord(final char[] word, final int offset, final int length,
final int freq, final int dicTypeId) {
=======
public boolean addWord(final char[] word, final int offset, final int length, int freq,
final Dictionary.DataType dataType) {
ArrayList |
| Solution content |
|---|
return false;
}
public boolean addWord(final char[] word, final int offset, final int length, int freq,
final int dicTypeId, final Dictionary.DataType dataType) {
ArrayList |
| File |
|---|
| Suggest.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| If statement |
| Method signature |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
* Are accented forms of words suggested as corrections?
*/
public void testAccents() {
<<<<<<< HEAD
// ni |
| Solution content |
|---|
* Are accented forms of words suggested as corrections?
*/
public void testAccents() {
// ni |
| File |
|---|
| SuggestTests.java |
| Developer's decision |
|---|
| Combination |
| Kind of conflict |
|---|
| Comment |
| Method declaration |
| Method invocation |
| Method signature |