1 /* 2 * Copyright (C) 2014 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #ifndef LATINIME_BIGRAM_PROPERTY_H 18 #define LATINIME_BIGRAM_PROPERTY_H 19 20 #include <vector> 21 22 #include "defines.h" 23 24 namespace latinime { 25 26 // TODO: Change to NgramProperty. 27 class BigramProperty { 28 public: 29 BigramProperty(const std::vector<int> *const targetCodePoints, 30 const int probability, const int timestamp, const int level, const int count) 31 : mTargetCodePoints(*targetCodePoints), mProbability(probability), 32 mTimestamp(timestamp), mLevel(level), mCount(count) {} 33 34 const std::vector<int> *getTargetCodePoints() const { 35 return &mTargetCodePoints; 36 } 37 38 int getProbability() const { 39 return mProbability; 40 } 41 42 int getTimestamp() const { 43 return mTimestamp; 44 } 45 46 int getLevel() const { 47 return mLevel; 48 } 49 50 int getCount() const { 51 return mCount; 52 } 53 54 private: 55 // Default copy constructor and assign operator are used for using in std::vector. 56 DISALLOW_DEFAULT_CONSTRUCTOR(BigramProperty); 57 58 // TODO: Make members const. 59 std::vector<int> mTargetCodePoints; 60 int mProbability; 61 int mTimestamp; 62 int mLevel; 63 int mCount; 64 }; 65 } // namespace latinime 66 #endif // LATINIME_WORD_PROPERTY_H 67