Provides an interface to read Inflection's lexical dictionaries.
More...
#include <DictionaryMetaData.hpp>
Provides an interface to read Inflection's lexical dictionaries.
Definition at line 19 of file DictionaryMetaData.hpp.
◆ createDictionary()
Factory method to return a DictionaryMetaData singleton for each locale.
- Parameters
-
locale | The locale to get the lexical dictionary. |
- Returns
- A singleton. Do not delete this object.
◆ getBinaryProperties() [1/2]
int64_t inflection::dictionary::DictionaryMetaData::getBinaryProperties |
( |
const ::std::vector<::std::u16string > & |
properties | ) |
const |
Retrieve all of the property names and return set the provided return value.
- Returns
- The binary value representing the requested properties.
◆ getBinaryProperties() [2/2]
int64_t * inflection::dictionary::DictionaryMetaData::getBinaryProperties |
( |
int64_t * |
result, |
|
|
const ::std::vector<::std::u16string > & |
properties |
|
) |
| const |
Given the string form of the property names, return a bit field representing each requested property
- Parameters
-
result | If the properties are known, the result value is set with the binary value representing the requested properties. |
properties | These are the string form of the word properties |
- Returns
- null if no properties are found.
◆ getCombinedBinaryType()
int64_t * inflection::dictionary::DictionaryMetaData::getCombinedBinaryType |
( |
int64_t * |
result, |
|
|
std::u16string_view |
word |
|
) |
| const |
Get all of the binary types of a word or phrase. The name for each bit can be retrieved by getPropertyName().
◆ getKnownWords()
Returns an iterator to iterate over all known words in this dictionary.
◆ getKnownWordsSize()
int32_t inflection::dictionary::DictionaryMetaData::getKnownWordsSize |
( |
| ) |
const |
Returns the number of known words in this dictionary.
◆ getProperties()
::std::vector<::std::u16string > inflection::dictionary::DictionaryMetaData::getProperties |
( |
std::u16string_view |
word | ) |
const |
Returns the string form of all of the binary property values.
◆ getPropertyName()
::std::u16string inflection::dictionary::DictionaryMetaData::getPropertyName |
( |
int64_t |
singleProperty | ) |
const |
Given a single bit turned on, return the name of the property.
◆ getPropertyNames()
::std::vector<::std::u16string > inflection::dictionary::DictionaryMetaData::getPropertyNames |
( |
int64_t |
binaryProperties | ) |
const |
Turns all of the bits in the binary properties into string based property names.
◆ getPropertyValues() [1/2]
bool inflection::dictionary::DictionaryMetaData::getPropertyValues |
( |
::std::vector<::std::u16string > * |
result, |
|
|
std::u16string_view |
word, |
|
|
std::u16string_view |
partOfSpeech |
|
) |
| const |
Returns the all of the values for the given property key.
◆ getPropertyValues() [2/2]
::std::vector<::std::u16string > inflection::dictionary::DictionaryMetaData::getPropertyValues |
( |
std::u16string_view |
word, |
|
|
std::u16string_view |
partOfSpeech |
|
) |
| const |
Returns the all of the values for the given property key.
◆ hasAllProperties()
bool inflection::dictionary::DictionaryMetaData::hasAllProperties |
( |
std::u16string_view |
word, |
|
|
int64_t |
partOfSpeech |
|
) |
| const |
Does the given word or phrase have all of the specified properties.
◆ hasAnyProperty()
bool inflection::dictionary::DictionaryMetaData::hasAnyProperty |
( |
std::u16string_view |
word, |
|
|
int64_t |
partOfSpeech |
|
) |
| const |
Does the given word or phrase have at least one of the specified properties.
◆ hasProperty()
bool inflection::dictionary::DictionaryMetaData::hasProperty |
( |
std::u16string_view |
word, |
|
|
std::u16string_view |
partOfSpeech |
|
) |
| const |
Does the given word or phrase have the specified property. If you plan to do a lot of these operations, it's faster to turn the property name into a binary representation with getBinaryProperties(), and then compare the binary properties with the result from getCombinedBinaryType() for the word or phrase.
◆ isKnownWord()
bool inflection::dictionary::DictionaryMetaData::isKnownWord |
( |
std::u16string_view |
word | ) |
const |
Is the provided word a known word in the dictionary.
◆ Inflector
◆ Inflector_MMappedDictionary
friend class Inflector_MMappedDictionary |
|
friend |
The documentation for this class was generated from the following file:
- /home/runner/work/inflection/inflection/inflection/build/inflection_headers/inflection/dictionary/DictionaryMetaData.hpp