michael@0: // Copyright 2013 Google Inc. All Rights Reserved. michael@0: // michael@0: // Licensed under the Apache License, Version 2.0 (the "License"); michael@0: // you may not use this file except in compliance with the License. michael@0: // You may obtain a copy of the License at michael@0: // michael@0: // http://www.apache.org/licenses/LICENSE-2.0 michael@0: // michael@0: // Unless required by applicable law or agreed to in writing, software michael@0: // distributed under the License is distributed on an "AS IS" BASIS, michael@0: // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. michael@0: // See the License for the specific language governing permissions and michael@0: // limitations under the License. michael@0: michael@0: // michael@0: // Author: dsites@google.com (Dick Sites) michael@0: // michael@0: michael@0: michael@0: #ifndef I18N_ENCODINGS_CLD2_INTERNAL_CLD2TABLESUMMARY_H_ michael@0: #define I18N_ENCODINGS_CLD2_INTERNAL_CLD2TABLESUMMARY_H_ michael@0: michael@0: #include "integral_types.h" michael@0: michael@0: namespace CLD2 { michael@0: michael@0: // Hash bucket for four-way associative lookup, indirect probabilities michael@0: // 16 bytes per bucket, 4-byte entries michael@0: typedef struct { michael@0: uint32 keyvalue[4]; // Upper part of word is hash, lower is indirect prob michael@0: } IndirectProbBucket4; michael@0: michael@0: michael@0: // Expanded version December 2012. michael@0: // Moves cutoff for 6-language vs. 3-language indirects michael@0: // Has list of recognized lang-script combinations michael@0: typedef struct { michael@0: const IndirectProbBucket4* kCLDTable; michael@0: // Each bucket has four entries, part michael@0: // key and part indirect subscript michael@0: const uint32* kCLDTableInd; // Each entry is three packed lang/prob michael@0: uint32 kCLDTableSizeOne; // Indirect subscripts >= this: 2 entries michael@0: uint32 kCLDTableSize; // Bucket count michael@0: uint32 kCLDTableKeyMask; // Mask hash key michael@0: uint32 kCLDTableBuildDate; // yyyymmdd michael@0: const char* kRecognizedLangScripts; // Character string of lang-Scripts michael@0: // recognized: "en-Latn az-Arab ..." michael@0: // Single space delimiter, Random order michael@0: } CLD2TableSummary; michael@0: michael@0: } // End namespace CLD2 michael@0: michael@0: #endif // I18N_ENCODINGS_CLD2_INTERNAL_CLD2TABLESUMMARY_H_ michael@0: michael@0: