Inflection
Morphology Inflection
Loading...
Searching...
No Matches
LanguageGrammarFeatures.hpp
1/*
2 * Copyright 2016-2024 Apple Inc. All rights reserved.
3 */
4#pragma once
5
6#include <inflection/lang/features/fwd.hpp>
7#include <inflection/lang/features/LanguageGrammarFeatures_Feature.hpp>
8#include <inflection/lang/features/LanguageGrammarFeatures_GrammarCategory.hpp>
9#include <inflection/lang/features/LanguageGrammarFeatures_GrammarFeatures.hpp>
10#include <inflection/util/ULocale.hpp>
11#include <inflection/Object.hpp>
12#include <map>
13#include <set>
14#include <string>
15
23 : public virtual ::inflection::Object
24{
25
26public:
28 typedef ::inflection::Object super;
30
31private:
33 const Grammar& grammar;
34 const Features& features;
35
36public:
41 static ::inflection::lang::features::LanguageGrammarFeatures getLanguageGrammarFeatures(const ::inflection::util::ULocale& locale);
45 static std::set<::inflection::util::ULocale> getKnownLanguages();
53 int32_t getCategoriesCount() const;
54private:
55 static void addCategory(std::map<std::u16string, LanguageGrammarFeatures_GrammarCategory>* categories, const Category& category);
56public:
60 std::map<std::u16string, ::inflection::lang::features::LanguageGrammarFeatures_GrammarCategory> getCategories() const;
64 int32_t getFeaturesCount() const;
68 std::set<::inflection::lang::features::LanguageGrammarFeatures_GrammarFeatures> getFeatures() const;
69
70private:
71 explicit LanguageGrammarFeatures(const ::inflection::util::ULocale& language, const Grammar& grammar, const Features& features);
72public:
77
78private:
82};
Inflection's root object.
Definition Object.hpp:14
A single feature value with a set of constraints for when the value is valid.
This class provides information about semantic features and grammatical categories used for the class...
::inflection::util::ULocale getLanguage() const
::inflection::lang::features::LanguageGrammarFeatures getLanguageGrammarFeatures(const ::inflection::util::ULocale &locale)
std::map< std::u16string, ::inflection::lang::features::LanguageGrammarFeatures_GrammarCategory > getCategories() const
std::set<::inflection::lang::features::LanguageGrammarFeatures_GrammarFeatures > getFeatures() const
static std::set<::inflection::util::ULocale > getKnownLanguages()
An object that represents a specific geographical, political, or cultural region.
Definition ULocale.hpp:83
The C++ namespace for Inflection.
Definition fwd.hpp:11