mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Merge "Cosmetic fixes and style fixes"
This commit is contained in:
commit
c51d45ac33
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
**
|
*
|
||||||
** Copyright 2011, The Android Open Source Project
|
* Copyright 2011, The Android Open Source Project
|
||||||
**
|
*
|
||||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
** you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
** You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
**
|
*
|
||||||
** http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
**
|
*
|
||||||
** Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
** See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
** limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define LOG_TAG "LatinIME: jni: ProximityInfo"
|
#define LOG_TAG "LatinIME: jni: ProximityInfo"
|
||||||
@ -85,5 +85,4 @@ int register_ProximityInfo(JNIEnv *env) {
|
|||||||
return registerNativeMethods(env, kClassPathName, sKeyboardMethods,
|
return registerNativeMethods(env, kClassPathName, sKeyboardMethods,
|
||||||
sizeof(sKeyboardMethods) / sizeof(sKeyboardMethods[0]));
|
sizeof(sKeyboardMethods) / sizeof(sKeyboardMethods[0]));
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace latinime
|
} // namespace latinime
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
**
|
*
|
||||||
** Copyright 2011, The Android Open Source Project
|
* Copyright 2011, The Android Open Source Project
|
||||||
**
|
*
|
||||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
** you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
** You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
**
|
*
|
||||||
** http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
**
|
*
|
||||||
** Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
** See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
** limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _COM_ANDROID_INPUTMETHOD_KEYBOARD_PROXIMITYINFO_H
|
#ifndef _COM_ANDROID_INPUTMETHOD_KEYBOARD_PROXIMITYINFO_H
|
||||||
@ -24,6 +24,5 @@ namespace latinime {
|
|||||||
|
|
||||||
int register_ProximityInfo(JNIEnv *env);
|
int register_ProximityInfo(JNIEnv *env);
|
||||||
|
|
||||||
}
|
} // namespace latinime
|
||||||
|
|
||||||
#endif // _COM_ANDROID_INPUTMETHOD_KEYBOARD_PROXIMITYINFO_H
|
#endif // _COM_ANDROID_INPUTMETHOD_KEYBOARD_PROXIMITYINFO_H
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
**
|
*
|
||||||
** Copyright 2009, The Android Open Source Project
|
* Copyright 2009, The Android Open Source Project
|
||||||
**
|
*
|
||||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
** you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
** You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
**
|
*
|
||||||
** http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
**
|
*
|
||||||
** Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
** See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
** limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define LOG_TAG "LatinIME: jni: BinaryDictionary"
|
#define LOG_TAG "LatinIME: jni: BinaryDictionary"
|
||||||
@ -267,5 +267,4 @@ int register_BinaryDictionary(JNIEnv *env) {
|
|||||||
return registerNativeMethods(env, kClassPathName, sMethods,
|
return registerNativeMethods(env, kClassPathName, sMethods,
|
||||||
sizeof(sMethods) / sizeof(sMethods[0]));
|
sizeof(sMethods) / sizeof(sMethods[0]));
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace latinime
|
} // namespace latinime
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
**
|
*
|
||||||
** Copyright 2011, The Android Open Source Project
|
* Copyright 2011, The Android Open Source Project
|
||||||
**
|
*
|
||||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
** you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
** You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
**
|
*
|
||||||
** http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
**
|
*
|
||||||
** Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
** See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
** limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _COM_ANDROID_INPUTMETHOD_LATIN_BINARYDICTIONARY_H
|
#ifndef _COM_ANDROID_INPUTMETHOD_LATIN_BINARYDICTIONARY_H
|
||||||
@ -24,6 +24,5 @@ namespace latinime {
|
|||||||
|
|
||||||
int register_BinaryDictionary(JNIEnv *env);
|
int register_BinaryDictionary(JNIEnv *env);
|
||||||
|
|
||||||
}
|
} // namespace latinime
|
||||||
|
|
||||||
#endif // _COM_ANDROID_INPUTMETHOD_LATIN_BINARYDICTIONARY_H
|
#endif // _COM_ANDROID_INPUTMETHOD_LATIN_BINARYDICTIONARY_H
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
**
|
*
|
||||||
** Copyright 2012, The Android Open Source Project
|
* Copyright 2012, The Android Open Source Project
|
||||||
**
|
*
|
||||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
** you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
** You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
**
|
*
|
||||||
** http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
**
|
*
|
||||||
** Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
** See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
** limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "com_android_inputmethod_latin_NativeUtils.h"
|
#include "com_android_inputmethod_latin_NativeUtils.h"
|
||||||
@ -36,5 +36,4 @@ int register_NativeUtils(JNIEnv *env) {
|
|||||||
return registerNativeMethods(env, kClassPathName, sMethods,
|
return registerNativeMethods(env, kClassPathName, sMethods,
|
||||||
sizeof(sMethods) / sizeof(sMethods[0]));
|
sizeof(sMethods) / sizeof(sMethods[0]));
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace latinime
|
} // namespace latinime
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
**
|
*
|
||||||
** Copyright 2012, The Android Open Source Project
|
* Copyright 2012, The Android Open Source Project
|
||||||
**
|
*
|
||||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
** you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
** You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
**
|
*
|
||||||
** http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
**
|
*
|
||||||
** Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
** See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
** limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _COM_ANDROID_INPUTMETHOD_LATIN_NATIVEUTILS_H
|
#ifndef _COM_ANDROID_INPUTMETHOD_LATIN_NATIVEUTILS_H
|
||||||
@ -24,6 +24,5 @@ namespace latinime {
|
|||||||
|
|
||||||
int register_NativeUtils(JNIEnv *env);
|
int register_NativeUtils(JNIEnv *env);
|
||||||
|
|
||||||
}
|
} // namespace latinime
|
||||||
|
|
||||||
#endif // _COM_ANDROID_INPUTMETHOD_LATIN_NATIVEUTILS_H
|
#endif // _COM_ANDROID_INPUTMETHOD_LATIN_NATIVEUTILS_H
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
**
|
*
|
||||||
** Copyright 2011, The Android Open Source Project
|
* Copyright 2011, The Android Open Source Project
|
||||||
**
|
*
|
||||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
** you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
** You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
**
|
*
|
||||||
** http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
**
|
*
|
||||||
** Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
** See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
** limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define LOG_TAG "LatinIME: jni"
|
#define LOG_TAG "LatinIME: jni"
|
||||||
@ -82,5 +82,4 @@ int registerNativeMethods(JNIEnv* env, const char* className, JNINativeMethod* m
|
|||||||
env->DeleteLocalRef(clazz);
|
env->DeleteLocalRef(clazz);
|
||||||
return JNI_TRUE;
|
return JNI_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace latinime
|
} // namespace latinime
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
**
|
*
|
||||||
** Copyright 2011, The Android Open Source Project
|
* Copyright 2011, The Android Open Source Project
|
||||||
**
|
*
|
||||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
** you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
** You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
**
|
*
|
||||||
** http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
**
|
*
|
||||||
** Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
** See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
** limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef LATINIME_JNI_COMMON_H
|
#ifndef LATINIME_JNI_COMMON_H
|
||||||
@ -54,7 +54,5 @@ inline void safeReleaseFloatArrayElements(JNIEnv *env, jfloatArray jArray, jfloa
|
|||||||
env->ReleaseFloatArrayElements(jArray, cArray, 0);
|
env->ReleaseFloatArrayElements(jArray, cArray, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace latinime
|
} // namespace latinime
|
||||||
|
|
||||||
#endif // LATINIME_JNI_COMMON_H
|
#endif // LATINIME_JNI_COMMON_H
|
||||||
|
@ -38,4 +38,4 @@ const int32_t AdditionalProximityChars::EN_US_ADDITIONAL_O[EN_US_ADDITIONAL_O_SI
|
|||||||
const int32_t AdditionalProximityChars::EN_US_ADDITIONAL_U[EN_US_ADDITIONAL_U_SIZE] = {
|
const int32_t AdditionalProximityChars::EN_US_ADDITIONAL_U[EN_US_ADDITIONAL_U_SIZE] = {
|
||||||
'a', 'e', 'i', 'o'
|
'a', 'e', 'i', 'o'
|
||||||
};
|
};
|
||||||
}
|
} // namespace latinime
|
||||||
|
@ -89,7 +89,5 @@ class AdditionalProximityChars {
|
|||||||
return getAdditionalCharsSize(locale_str, c) > 0;
|
return getAdditionalCharsSize(locale_str, c) > 0;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
} // namespace latinime
|
||||||
}
|
|
||||||
|
|
||||||
#endif // LATINIME_ADDITIONAL_PROXIMITY_CHARS_H
|
#endif // LATINIME_ADDITIONAL_PROXIMITY_CHARS_H
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
namespace latinime {
|
namespace latinime {
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* Table mapping most combined Latin, Greek, and Cyrillic characters
|
* Table mapping most combined Latin, Greek, and Cyrillic characters
|
||||||
* to their base characters. If c is in range, BASE_CHARS[c] == c
|
* to their base characters. If c is in range, BASE_CHARS[c] == c
|
||||||
* if c is not a combined character, or the base character if it
|
* if c is not a combined character, or the base character if it
|
||||||
@ -187,8 +187,6 @@ const unsigned short BASE_CHARS[BASE_CHARS_SIZE] = {
|
|||||||
0x0423, 0x0443, 0x0423, 0x0443, 0x0427, 0x0447, 0x04f6, 0x04f7,
|
0x0423, 0x0443, 0x0423, 0x0443, 0x0427, 0x0447, 0x04f6, 0x04f7,
|
||||||
0x042b, 0x044b, 0x04fa, 0x04fb, 0x04fc, 0x04fd, 0x04fe, 0x04ff,
|
0x042b, 0x044b, 0x04fa, 0x04fb, 0x04fc, 0x04fd, 0x04fe, 0x04ff,
|
||||||
};
|
};
|
||||||
|
|
||||||
// generated with:
|
// generated with:
|
||||||
// cat UnicodeData.txt | perl -e 'while (<>) { @foo = split(/;/); $foo[5] =~ s/<.*> //; $base[hex($foo[0])] = hex($foo[5]);} for ($i = 0; $i < 0x500; $i += 8) { for ($j = $i; $j < $i + 8; $j++) { printf("0x%04x, ", $base[$j] ? $base[$j] : $j)}; print "\n"; }'
|
// cat UnicodeData.txt | perl -e 'while (<>) { @foo = split(/;/); $foo[5] =~ s/<.*> //; $base[hex($foo[0])] = hex($foo[5]);} for ($i = 0; $i < 0x500; $i += 8) { for ($j = $i; $j < $i + 8; $j++) { printf("0x%04x, ", $base[$j] ? $base[$j] : $j)}; print "\n"; }'
|
||||||
|
|
||||||
} // namespace latinime
|
} // namespace latinime
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
**
|
*
|
||||||
** Copyright 2010, The Android Open Source Project
|
* Copyright 2010, The Android Open Source Project
|
||||||
**
|
*
|
||||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
** you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
** You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
**
|
*
|
||||||
** http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
**
|
*
|
||||||
** Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
** See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
** limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -53,7 +53,5 @@ class BigramDictionary {
|
|||||||
// TODO: Re-implement proximity correction for bigram correction
|
// TODO: Re-implement proximity correction for bigram correction
|
||||||
static const int MAX_ALTERNATIVES = 1;
|
static const int MAX_ALTERNATIVES = 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace latinime
|
} // namespace latinime
|
||||||
|
|
||||||
#endif // LATINIME_BIGRAM_DICTIONARY_H
|
#endif // LATINIME_BIGRAM_DICTIONARY_H
|
||||||
|
@ -557,7 +557,5 @@ inline int BinaryFormat::getProbability(const int position, const std::map<int,
|
|||||||
return backoff(unigramFreq);
|
return backoff(unigramFreq);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace latinime
|
} // namespace latinime
|
||||||
|
|
||||||
#endif // LATINIME_BINARY_FORMAT_H
|
#endif // LATINIME_BINARY_FORMAT_H
|
||||||
|
@ -32,7 +32,5 @@ static inline bool isInFilter(const uint8_t *filter, const int position) {
|
|||||||
const unsigned int bucket = position % BIGRAM_FILTER_MODULO;
|
const unsigned int bucket = position % BIGRAM_FILTER_MODULO;
|
||||||
return filter[bucket >> 3] & (1 << (bucket & 0x7));
|
return filter[bucket >> 3] & (1 << (bucket & 0x7));
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace latinime
|
} // namespace latinime
|
||||||
|
|
||||||
#endif // LATINIME_BLOOM_FILTER_H
|
#endif // LATINIME_BLOOM_FILTER_H
|
||||||
|
@ -895,5 +895,4 @@ unsigned short latin_tolower(unsigned short c) {
|
|||||||
compare_pair_capital);
|
compare_pair_capital);
|
||||||
return p ? p->small : c;
|
return p ? p->small : c;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace latinime
|
} // namespace latinime
|
||||||
|
@ -62,7 +62,5 @@ inline static unsigned short toLowerCase(const unsigned short c) {
|
|||||||
inline static unsigned short toBaseLowerCase(const unsigned short c) {
|
inline static unsigned short toBaseLowerCase(const unsigned short c) {
|
||||||
return toLowerCase(toBaseChar(c));
|
return toLowerCase(toBaseChar(c));
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace latinime
|
} // namespace latinime
|
||||||
|
|
||||||
#endif // LATINIME_CHAR_UTILS_H
|
#endif // LATINIME_CHAR_UTILS_H
|
||||||
|
@ -79,6 +79,5 @@ inline static void initCorrectionState(CorrectionState *state, const int rootPos
|
|||||||
state->mSkipping = false;
|
state->mSkipping = false;
|
||||||
state->mAdditionalProximityMatching = false;
|
state->mAdditionalProximityMatching = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace latinime
|
} // namespace latinime
|
||||||
#endif // LATINIME_CORRECTION_STATE_H
|
#endif // LATINIME_CORRECTION_STATE_H
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
**
|
*
|
||||||
** Copyright 2011, The Android Open Source Project
|
* Copyright 2011, The Android Open Source Project
|
||||||
**
|
*
|
||||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
** you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
** You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
**
|
*
|
||||||
** http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
**
|
*
|
||||||
** Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
** See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
** limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef LATINIME_DEBUG_H
|
#ifndef LATINIME_DEBUG_H
|
||||||
@ -68,5 +68,4 @@ static inline void printDebug(const char* tag, int* codes, int codesSize, int MA
|
|||||||
|
|
||||||
free(buf);
|
free(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // LATINIME_DEBUG_H
|
#endif // LATINIME_DEBUG_H
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
**
|
*
|
||||||
** Copyright 2010, The Android Open Source Project
|
* Copyright 2010, The Android Open Source Project
|
||||||
**
|
*
|
||||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
** you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
** You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
**
|
*
|
||||||
** http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
**
|
*
|
||||||
** Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
** See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
** limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef LATINIME_DEFINES_H
|
#ifndef LATINIME_DEFINES_H
|
||||||
@ -313,5 +313,4 @@ typedef enum {
|
|||||||
// Additional proximity char which can differ by language.
|
// Additional proximity char which can differ by language.
|
||||||
ADDITIONAL_PROXIMITY_CHAR
|
ADDITIONAL_PROXIMITY_CHAR
|
||||||
} ProximityType;
|
} ProximityType;
|
||||||
|
|
||||||
#endif // LATINIME_DEFINES_H
|
#endif // LATINIME_DEFINES_H
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
**
|
*
|
||||||
** Copyright 2009, The Android Open Source Project
|
* Copyright (C) 2009, The Android Open Source Project
|
||||||
**
|
*
|
||||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
** you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
** You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
**
|
*
|
||||||
** http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
**
|
*
|
||||||
** Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
** See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
** limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@ -63,5 +63,4 @@ bool Dictionary::isValidBigram(const int32_t *word1, int length1, const int32_t
|
|||||||
int length2) const {
|
int length2) const {
|
||||||
return mBigramDictionary->isValidBigram(word1, length1, word2, length2);
|
return mBigramDictionary->isValidBigram(word1, length1, word2, length2);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace latinime
|
} // namespace latinime
|
||||||
|
@ -113,5 +113,4 @@ inline int Dictionary::wideStrLen(unsigned short *str) {
|
|||||||
return end - str;
|
return end - str;
|
||||||
}
|
}
|
||||||
} // namespace latinime
|
} // namespace latinime
|
||||||
|
|
||||||
#endif // LATINIME_DICTIONARY_H
|
#endif // LATINIME_DICTIONARY_H
|
||||||
|
@ -141,7 +141,5 @@ class ProximityInfo {
|
|||||||
int mCodeToKeyIndex[MAX_CHAR_CODE + 1];
|
int mCodeToKeyIndex[MAX_CHAR_CODE + 1];
|
||||||
// TODO: move to correction.h
|
// TODO: move to correction.h
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace latinime
|
} // namespace latinime
|
||||||
|
|
||||||
#endif // LATINIME_PROXIMITY_INFO_H
|
#endif // LATINIME_PROXIMITY_INFO_H
|
||||||
|
@ -215,7 +215,5 @@ class ProximityInfoState {
|
|||||||
int mInputLength;
|
int mInputLength;
|
||||||
unsigned short mPrimaryInputWord[MAX_WORD_LENGTH_INTERNAL];
|
unsigned short mPrimaryInputWord[MAX_WORD_LENGTH_INTERNAL];
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace latinime
|
} // namespace latinime
|
||||||
|
|
||||||
#endif // LATINIME_PROXIMITY_INFO_STATE_H
|
#endif // LATINIME_PROXIMITY_INFO_STATE_H
|
||||||
|
@ -79,5 +79,4 @@ class TerminalAttributes {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
} // namespace latinime
|
} // namespace latinime
|
||||||
|
|
||||||
#endif // LATINIME_TERMINAL_ATTRIBUTES_H
|
#endif // LATINIME_TERMINAL_ATTRIBUTES_H
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
**
|
*
|
||||||
** Copyright 2010, The Android Open Source Project
|
* Copyright 2010, The Android Open Source Project
|
||||||
**
|
*
|
||||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
** you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
** You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
**
|
*
|
||||||
** http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
**
|
*
|
||||||
** Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
** See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
** limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
@ -991,5 +991,4 @@ inline bool UnigramDictionary::processCurrentNode(const int initialPos,
|
|||||||
*newChildrenPosition = childrenPos;
|
*newChildrenPosition = childrenPos;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace latinime
|
} // namespace latinime
|
||||||
|
@ -160,5 +160,4 @@ class UnigramDictionary {
|
|||||||
static const digraph_t FRENCH_LIGATURES_DIGRAPHS[];
|
static const digraph_t FRENCH_LIGATURES_DIGRAPHS[];
|
||||||
};
|
};
|
||||||
} // namespace latinime
|
} // namespace latinime
|
||||||
|
|
||||||
#endif // LATINIME_UNIGRAM_DICTIONARY_H
|
#endif // LATINIME_UNIGRAM_DICTIONARY_H
|
||||||
|
@ -226,6 +226,5 @@ class WordsPriorityQueue {
|
|||||||
SuggestedWord *mSuggestedWords;
|
SuggestedWord *mSuggestedWords;
|
||||||
SuggestedWord *mHighestSuggestedWord;
|
SuggestedWord *mHighestSuggestedWord;
|
||||||
};
|
};
|
||||||
}
|
} // namespace latinime
|
||||||
|
|
||||||
#endif // LATINIME_WORDS_PRIORITY_QUEUE_H
|
#endif // LATINIME_WORDS_PRIORITY_QUEUE_H
|
||||||
|
@ -92,6 +92,5 @@ class WordsPriorityQueuePool {
|
|||||||
char mSubQueueBuf[MULTIPLE_WORDS_SUGGESTION_MAX_WORDS
|
char mSubQueueBuf[MULTIPLE_WORDS_SUGGESTION_MAX_WORDS
|
||||||
* SUB_QUEUE_MAX_COUNT * sizeof(WordsPriorityQueue)];
|
* SUB_QUEUE_MAX_COUNT * sizeof(WordsPriorityQueue)];
|
||||||
};
|
};
|
||||||
}
|
} // namespace latinime
|
||||||
|
|
||||||
#endif // LATINIME_WORDS_PRIORITY_QUEUE_POOL_H
|
#endif // LATINIME_WORDS_PRIORITY_QUEUE_POOL_H
|
||||||
|
Loading…
x
Reference in New Issue
Block a user