ukui-search/libchinese-segmentation/pinyin4cpp-common.h

74 lines
2.4 KiB
C
Raw Normal View History

/*
* Copyright (C) 2022, KylinSoft Co., Ltd.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* Authors: jixiaoxu <jixiaoxu@kylinos.cn>
*
*/
#ifndef PINYIN4CPP_COMMON_H
#define PINYIN4CPP_COMMON_H
/**
* @brief The PinyinDataStyle enum
* Default return zhong xin
* Tone # return zhōng xīn
* Tone2 2 # return zho1ng xi1n
* Tone3 3 # return zhong1 xin1
* FirstLetter # return z x
* English () # return center,heart,core
*/
enum class PinyinDataStyle {
Default = 1u << 0,
Tone = 1u << 1,
Tone2 = 1u << 2,
Tone3 = 1u << 3,
FirstLetter = 1u << 4,
English = 1u << 5
};
/**
* @brief The SegType enum
* Segmentation #->
* NoSegmentation #
*/
enum class SegType {
Segmentation = 1u << 0,
NoSegmentation = 1u << 1
};
/**
* @brief The PolyphoneType enum
* Disable return qi an xin
* Enable returnqi,ji an xin
* return "zhao/chao yang/yang"
*/
enum class PolyphoneType {
Disable = 1u << 0,
Enable = 1u << 1
};
/**
* @brief The ExDataProcessType enum
* Default 123 return "123 mu tou ren"
* Delete #123 return "mu tou ren"
*/
enum class ExDataProcessType {
Default = 1u << 0,
Delete = 1u << 1
};
#endif //PINYIN4CPP_COMMON_H