diff --git a/java/res/values/config-auto-correction-thresholds.xml b/java/res/values/config-auto-correction-thresholds.xml index fc701c7ff..668f90e73 100644 --- a/java/res/values/config-auto-correction-thresholds.xml +++ b/java/res/values/config-auto-correction-thresholds.xml @@ -37,7 +37,7 @@ + may be more forgiving of allowlist entries in another language. --> 0.065 diff --git a/java/res/values/emoji-categories.xml b/java/res/values/emoji-categories.xml index ce82a8b40..ae5ccc74a 100644 --- a/java/res/values/emoji-categories.xml +++ b/java/res/values/emoji-categories.xml @@ -22,7 +22,7 @@ There is another emoji code point list for JB-MR2 and KLP and later under res/xml/values-v1[89].--> - mForgettingCurveProbabilityValuesTableId), mCodePointTable(headerPolicy->mCodePointTable) {} - // Temporary dummy header. + // Temporary placeholder header. HeaderPolicy() : mDictFormatVersion(FormatUtils::UNKNOWN_VERSION), mDictionaryFlags(0), mSize(0), mAttributeMap(), mLocale(CharUtils::EMPTY_STRING), mMultiWordCostMultiplier(0.0f), diff --git a/native/jni/src/dictionary/structure/backward/v402/content/probability_dict_content.cpp b/native/jni/src/dictionary/structure/backward/v402/content/probability_dict_content.cpp index b167f0ab2..587a1c097 100644 --- a/native/jni/src/dictionary/structure/backward/v402/content/probability_dict_content.cpp +++ b/native/jni/src/dictionary/structure/backward/v402/content/probability_dict_content.cpp @@ -69,7 +69,7 @@ bool ProbabilityDictContent::setProbabilityEntry(const int terminalId, // Write new entry. int writingPos = getBuffer()->getTailPosition(); while (writingPos <= entryPos) { - // Fulfilling with dummy entries until writingPos. + // Fulfilling with placeholder entries until writingPos. if (!writeEntry(&dummyEntry, writingPos)) { AKLOGE("Cannot write dummy entry. pos: %d, mSize: %d", writingPos, mSize); return false; diff --git a/native/jni/src/dictionary/structure/backward/v402/content/probability_entry.h b/native/jni/src/dictionary/structure/backward/v402/content/probability_entry.h index 94e36bf51..68176a457 100644 --- a/native/jni/src/dictionary/structure/backward/v402/content/probability_entry.h +++ b/native/jni/src/dictionary/structure/backward/v402/content/probability_entry.h @@ -38,7 +38,7 @@ class ProbabilityEntry { : mFlags(probabilityEntry.mFlags), mProbability(probabilityEntry.mProbability), mHistoricalInfo(probabilityEntry.mHistoricalInfo) {} - // Dummy entry + // Placeholder entry ProbabilityEntry() : mFlags(0), mProbability(NOT_A_PROBABILITY), mHistoricalInfo() {} diff --git a/native/jni/src/dictionary/structure/backward/v402/ver4_patricia_trie_node_writer.cpp b/native/jni/src/dictionary/structure/backward/v402/ver4_patricia_trie_node_writer.cpp index e3ab5ec20..075dc6d01 100644 --- a/native/jni/src/dictionary/structure/backward/v402/ver4_patricia_trie_node_writer.cpp +++ b/native/jni/src/dictionary/structure/backward/v402/ver4_patricia_trie_node_writer.cpp @@ -339,7 +339,7 @@ bool Ver4PatriciaTrieNodeWriter::writePtNodeAndGetTerminalIdAndAdvancePosition( const PtNodeParams *const ptNodeParams, int *const outTerminalId, int *const ptNodeWritingPos) { const int nodePos = *ptNodeWritingPos; - // Write dummy flags. The Node flags are updated with appropriate flags at the last step of the + // Write placeholder flags. The Node flags are updated with appropriate flags at the last step of the // PtNode writing. if (!DynamicPtWritingUtils::writeFlagsAndAdvancePosition(mTrieBuffer, 0 /* nodeFlags */, ptNodeWritingPos)) { diff --git a/native/jni/src/dictionary/structure/pt_common/dynamic_pt_gc_event_listeners.cpp b/native/jni/src/dictionary/structure/pt_common/dynamic_pt_gc_event_listeners.cpp index b5e2e9dae..1b1be324b 100644 --- a/native/jni/src/dictionary/structure/pt_common/dynamic_pt_gc_event_listeners.cpp +++ b/native/jni/src/dictionary/structure/pt_common/dynamic_pt_gc_event_listeners.cpp @@ -76,14 +76,14 @@ bool DynamicPtGcEventListeners::TraversePolicyToUpdateBigramProbability return true; } -// Writes dummy PtNode array size when the head of PtNode array is read. +// Writes placeholder PtNode array size when the head of PtNode array is read. bool DynamicPtGcEventListeners::TraversePolicyToPlaceAndWriteValidPtNodesToBuffer ::onDescend(const int ptNodeArrayPos) { mValidPtNodeCount = 0; int writingPos = mBufferToWrite->getTailPosition(); mDictPositionRelocationMap->mPtNodeArrayPositionRelocationMap.insert( PtNodeWriter::PtNodeArrayPositionRelocationMap::value_type(ptNodeArrayPos, writingPos)); - // Writes dummy PtNode array size because arrays can have a forward link or needles PtNodes. + // Writes placeholder PtNode array size because arrays can have a forward link or needles PtNodes. // This field will be updated later in onReadingPtNodeArrayTail() with actual PtNode count. mPtNodeArraySizeFieldPos = writingPos; return DynamicPtWritingUtils::writePtNodeArraySizeAndAdvancePosition( diff --git a/native/jni/src/dictionary/structure/pt_common/shortcut/shortcut_list_reading_utils.cpp b/native/jni/src/dictionary/structure/pt_common/shortcut/shortcut_list_reading_utils.cpp index 14428edd4..62ec3d85a 100644 --- a/native/jni/src/dictionary/structure/pt_common/shortcut/shortcut_list_reading_utils.cpp +++ b/native/jni/src/dictionary/structure/pt_common/shortcut/shortcut_list_reading_utils.cpp @@ -27,7 +27,7 @@ const ShortcutListReadingUtils::ShortcutFlags const ShortcutListReadingUtils::ShortcutFlags ShortcutListReadingUtils::MASK_ATTRIBUTE_PROBABILITY = 0x0F; const int ShortcutListReadingUtils::SHORTCUT_LIST_SIZE_FIELD_SIZE = 2; -// The numeric value of the shortcut probability that means 'whitelist'. +// The numeric value of the shortcut probability that means 'allowlist'. const int ShortcutListReadingUtils::WHITELIST_SHORTCUT_PROBABILITY = 15; /* static */ ShortcutListReadingUtils::ShortcutFlags diff --git a/native/jni/src/dictionary/structure/v4/content/probability_entry.h b/native/jni/src/dictionary/structure/v4/content/probability_entry.h index 473354b90..8dd1fb073 100644 --- a/native/jni/src/dictionary/structure/v4/content/probability_entry.h +++ b/native/jni/src/dictionary/structure/v4/content/probability_entry.h @@ -34,7 +34,7 @@ class ProbabilityEntry { : mFlags(probabilityEntry.mFlags), mProbability(probabilityEntry.mProbability), mHistoricalInfo(probabilityEntry.mHistoricalInfo) {} - // Dummy entry + // Placeholder entry ProbabilityEntry() : mFlags(Ver4DictConstants::FLAG_NOT_A_VALID_ENTRY), mProbability(NOT_A_PROBABILITY), mHistoricalInfo() {} diff --git a/native/jni/src/dictionary/structure/v4/ver4_patricia_trie_node_writer.cpp b/native/jni/src/dictionary/structure/v4/ver4_patricia_trie_node_writer.cpp index d974b50f4..774bc02c7 100644 --- a/native/jni/src/dictionary/structure/v4/ver4_patricia_trie_node_writer.cpp +++ b/native/jni/src/dictionary/structure/v4/ver4_patricia_trie_node_writer.cpp @@ -286,7 +286,7 @@ bool Ver4PatriciaTrieNodeWriter::writePtNodeAndGetTerminalIdAndAdvancePosition( const PtNodeParams *const ptNodeParams, int *const outTerminalId, int *const ptNodeWritingPos) { const int nodePos = *ptNodeWritingPos; - // Write dummy flags. The Node flags are updated with appropriate flags at the last step of the + // Write placeholder flags. The Node flags are updated with appropriate flags at the last step of the // PtNode writing. if (!DynamicPtWritingUtils::writeFlagsAndAdvancePosition(mTrieBuffer, 0 /* nodeFlags */, ptNodeWritingPos)) { diff --git a/native/jni/src/dictionary/utils/binary_dictionary_shortcut_iterator.h b/native/jni/src/dictionary/utils/binary_dictionary_shortcut_iterator.h index e14805e37..3638f3866 100644 --- a/native/jni/src/dictionary/utils/binary_dictionary_shortcut_iterator.h +++ b/native/jni/src/dictionary/utils/binary_dictionary_shortcut_iterator.h @@ -41,7 +41,7 @@ class BinaryDictionaryShortcutIterator { } // Gets the shortcut target itself as an int string and put it to outTarget, put its length - // to outTargetLength, put whether it is whitelist to outIsWhitelist. + // to outTargetLength, put whether it is allowlist to outIsWhitelist. AK_FORCE_INLINE void nextShortcutTarget( const int maxDepth, int *const outTarget, int *const outTargetLength, bool *const outIsWhitelist) { diff --git a/tests/res/raw/dummy_resource_for_testing.txt b/tests/res/raw/dummy_resource_for_testing.txt index 05da86b8f..88e64fd6e 100644 --- a/tests/res/raw/dummy_resource_for_testing.txt +++ b/tests/res/raw/dummy_resource_for_testing.txt @@ -1,3 +1,3 @@ -/* This dummy raw resource is needed to be able to load string resources from a test APK +/* This placeholder raw resource is needed to be able to load string resources from a test APK * successfully. (See {@link KeySpecParserSplitTests#setUp()}. */ diff --git a/tests/src/com/android/inputmethod/compat/SuggestionSpanUtilsTest.java b/tests/src/com/android/inputmethod/compat/SuggestionSpanUtilsTest.java index a0544d62a..e3fb30dbb 100644 --- a/tests/src/com/android/inputmethod/compat/SuggestionSpanUtilsTest.java +++ b/tests/src/com/android/inputmethod/compat/SuggestionSpanUtilsTest.java @@ -51,7 +51,7 @@ public class SuggestionSpanUtilsTest { } /** - * Helper method to create a dummy {@link SuggestedWordInfo}. + * Helper method to create a placeholder {@link SuggestedWordInfo}. * * @param kindAndFlags the kind and flags to be used to create {@link SuggestedWordInfo}. * @param word the word to be used to create {@link SuggestedWordInfo}. diff --git a/tests/src/com/android/inputmethod/latin/SuggestedWordsTests.java b/tests/src/com/android/inputmethod/latin/SuggestedWordsTests.java index 92bff0e2e..b41c7013c 100644 --- a/tests/src/com/android/inputmethod/latin/SuggestedWordsTests.java +++ b/tests/src/com/android/inputmethod/latin/SuggestedWordsTests.java @@ -36,7 +36,7 @@ import java.util.Locale; public class SuggestedWordsTests { /** - * Helper method to create a dummy {@link SuggestedWordInfo} with specifying + * Helper method to create a placeholder {@link SuggestedWordInfo} with specifying * {@link SuggestedWordInfo#KIND_TYPED}. * * @param word the word to be used to create {@link SuggestedWordInfo}. @@ -53,7 +53,7 @@ public class SuggestedWordsTests { } /** - * Helper method to create a dummy {@link SuggestedWordInfo} with specifying + * Helper method to create a placeholder {@link SuggestedWordInfo} with specifying * {@link SuggestedWordInfo#KIND_CORRECTION}. * * @param word the word to be used to create {@link SuggestedWordInfo}. diff --git a/tests/src/com/android/inputmethod/latin/makedict/BinaryDictEncoderUtils.java b/tests/src/com/android/inputmethod/latin/makedict/BinaryDictEncoderUtils.java index bd5136583..2ae5bf5c1 100644 --- a/tests/src/com/android/inputmethod/latin/makedict/BinaryDictEncoderUtils.java +++ b/tests/src/com/android/inputmethod/latin/makedict/BinaryDictEncoderUtils.java @@ -446,7 +446,7 @@ public class BinaryDictEncoderUtils { } /** - * Sanity-checking method. + * Validity-checking method. * * This method checks a list of PtNode arrays for juxtaposition, that is, it will do * nothing if each node array's cached address is actually the previous node array's address @@ -664,7 +664,7 @@ public class BinaryDictEncoderUtils { + "of the node : " + dictEncoder.getPosition() + " <> " + ptNode.mCachedAddressAfterUpdate); } - // Sanity checks. + // Validity checks. if (DBG && ptNode.getProbability() > FormatSpec.MAX_TERMINAL_FREQUENCY) { throw new RuntimeException("A node has a frequency > " + FormatSpec.MAX_TERMINAL_FREQUENCY diff --git a/tests/src/com/android/inputmethod/latin/makedict/FusionDictionary.java b/tests/src/com/android/inputmethod/latin/makedict/FusionDictionary.java index 6ba1ef966..2bed44d7a 100644 --- a/tests/src/com/android/inputmethod/latin/makedict/FusionDictionary.java +++ b/tests/src/com/android/inputmethod/latin/makedict/FusionDictionary.java @@ -277,7 +277,7 @@ public final class FusionDictionary implements Iterable { } /** - * Sanity check for a PtNode array. + * Validity check for a PtNode array. * * This method checks that all PtNodes in a node array are ordered as expected. * If they are, nothing happens. If they aren't, an exception is thrown. diff --git a/tests/src/com/android/inputmethod/latin/personalization/UserHistoryDictionaryTestsHelper.java b/tests/src/com/android/inputmethod/latin/personalization/UserHistoryDictionaryTestsHelper.java index 4b7b9bc36..d3ea2705b 100644 --- a/tests/src/com/android/inputmethod/latin/personalization/UserHistoryDictionaryTestsHelper.java +++ b/tests/src/com/android/inputmethod/latin/personalization/UserHistoryDictionaryTestsHelper.java @@ -37,7 +37,7 @@ import java.util.Random; public class UserHistoryDictionaryTestsHelper { /** - * Locale prefix for generating dummy locales for tests. + * Locale prefix for generating placeholder locales for tests. */ public static final String TEST_LOCALE_PREFIX = "test-";