diff options
author | CoprDistGit <infra@openeuler.org> | 2023-06-20 05:24:50 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-06-20 05:24:50 +0000 |
commit | 217c86aa64b0fa285300695fc4a59be103d78321 (patch) | |
tree | c0e49bed5219c18e24a3eeb4f2e2795f9e796d3f | |
parent | 4cc333339e513e5cde4d4de3eedb07d99875aa11 (diff) |
automatic import of python-librelingo-typesopeneuler20.03
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-librelingo-types.spec | 1140 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 1142 insertions, 0 deletions
@@ -0,0 +1 @@ +/librelingo_types-3.3.0.tar.gz diff --git a/python-librelingo-types.spec b/python-librelingo-types.spec new file mode 100644 index 0000000..417d041 --- /dev/null +++ b/python-librelingo-types.spec @@ -0,0 +1,1140 @@ +%global _empty_manifest_terminate_build 0 +Name: python-librelingo-types +Version: 3.3.0 +Release: 1 +Summary: Data types to be used in Python packages for LibreLingo +License: GPLv3 +URL: https://pypi.org/project/librelingo-types/ +Source0: https://mirrors.aliyun.com/pypi/web/packages/c6/71/b325dd3524f926e182acc8ad0c578dbb522685a62efc3a2af1606c0189cb/librelingo_types-3.3.0.tar.gz +BuildArch: noarch + + +%description +<a name="librelingo_types"></a> +# librelingo\_types + +Data types to be used in Python packages for LibreLingo + +<a name="librelingo_types.data_types"></a> +# librelingo\_types.data\_types + +<a name="librelingo_types.data_types.TextToSpeechSettings"></a> +## TextToSpeechSettings Objects + +```python +class TextToSpeechSettings( + namedtuple( + "TextToSpeechSettings", + [ + "provider", + "voice", + "engine", + ], + defaults=["Polly", "Lupe", "standard"], + )) +``` + +Settings about how to use TTS to generate audios + +### Usage example: + +>>> TextToSpeechSettings( +... provider="Polly", +... voice="Aditi", +... engine="standard" +... ) +TextToSpeechSettings(provider='Polly', voice='Aditi', engine='standard') + +<a name="librelingo_types.data_types.AudioSettings"></a> +## AudioSettings Objects + +```python +class AudioSettings( + namedtuple( + "AudioSettings", + [ + "enabled", + "text_to_speech_settings_list", + ], + defaults=[False, []], + )) +``` + +Settings for audio in a course + +### Usage example: + +>>> AudioSettings( +... enabled=True, +... text_to_speech_settings_list=[TextToSpeechSettings()] +... ) +AudioSettings(enabled=True, text_to_speech_settings_list=[TextToSpeechSettings(provider='Polly', voice='Lupe', engine='standard')]) + +<a name="librelingo_types.data_types.HunspellSettings"></a> +## HunspellSettings Objects + +```python +class HunspellSettings( + namedtuple( + "HunspellSettings", + [ + "source_language", + "target_language", + ], + defaults=[None, None], + )) +``` + +Settings for hunspell spell checking + +### Usage example: + +>>> HunspellSettings( +... source_language="en-US", +... target_language="es-ES", +... ) +HunspellSettings(source_language='en-US', target_language='es-ES') + +<a name="librelingo_types.data_types.Settings"></a> +## Settings Objects + +```python +class Settings( + namedtuple( + "Settings", + ["audio_settings", "hunspell"], + defaults=[AudioSettings(), HunspellSettings()], + )) +``` + +Settings for a course + +### Usage example: + +>>> Settings() +Settings(audio_settings=AudioSettings(enabled=False, text_to_speech_settings_list=[]), hunspell=HunspellSettings(source_language=None, target_language=None)) + +<a name="librelingo_types.data_types.Course"></a> +## Course Objects + +```python +class Course( + namedtuple( + "Course", + [ + "target_language", + "source_language", + "special_characters", + "modules", + "license", + "dictionary", + "repository_url", + "course_dir", + "settings", + ], + defaults=[Settings()], + )) +``` + +A LibreLingo course + +### Usage example: + +```python +my_course = Course( + target_language=Language("English", "en"), + source_language=Language("Spanish", "es"), + special_characters=[], + modules=[module1, module2, module3, module4], + license=License( + full_name="Attribution 4.0 International (CC BY 4.0)", + name="CC BY 4.0", + link="https://creativecommons.org/licenses/by/4.0/" + ), + dictionary=[dict_item1, dict_item2, dict_item3, dict_item4], + repository_url="https://example.com", + course_dir="some_language/course", + settings=Settings() +) +``` + +<a name="librelingo_types.data_types.Language"></a> +## Language Objects + +```python +class Language(namedtuple("Language", ["name", "code"])) +``` + +Metadata about a language + +### Usage example: + +>>> Language("English", "en") +Language(name='English', code='en') + +<a name="librelingo_types.data_types.License"></a> +## License Objects + +```python +class License( + namedtuple( + "License", + [ + "name", + "full_name", + "link", + ], + )) +``` + +Metadata about the license of a LibreLingo course + +### Usage example: + +>>> License( +... full_name="Attribution 4.0 International (CC BY 4.0)", +... name="CC BY 4.0", +... link="https://creativecommons.org/licenses/by/4.0/" +... ) +License(name='CC BY 4.0', full_name='Attribution 4.0 International (CC BY 4.0)', link='https://creativecommons.org/licenses/by/4.0/') + +<a name="librelingo_types.data_types.Module"></a> +## Module Objects + +```python +class Module( + namedtuple( + "Module", + [ + "title", + "filename", + "skills", + ], + )) +``` + +A module of a LibreLingo course. + +### Usage examples: + +```python +my_module = Module(title="Basics", filename="basic/module.yaml", skills=[skill1, skill2]) +``` + +<a name="librelingo_types.data_types.Skill"></a> +## Skill Objects + +```python +class Skill( + namedtuple( + "Skill", + [ + "name", + "filename", + "id", + "words", + "phrases", + "image_set", + "dictionary", + "introduction", + ], + )) +``` + +A skill of a module of a LibreLingo course. + +### Notes: + +*id*: Needs to be a unique ID. Use uuidv4. + +### Usage examples: + +```python +my_skill = Skill( + name="Animals", + filename="basic/skills/hello.yaml", + id="3adc78da-ea42-4ecd-9e3d-2e0986a3b914", + words=[word1, word2, word3], + phrases=[phrases1, phrases2, phrases3], + image_set=["cat1", "dog2", "horse1"], + dictionary=[dict_item_1, dict_item_2, dict_item_3, dict_item_4], + introduction="My *markdown* text", +) +``` + +<a name="librelingo_types.data_types.Word"></a> +## Word Objects + +```python +class Word( + namedtuple( + "Word", + [ + "in_target_language", + "in_source_language", + "pictures", + ], + )) +``` + +A new word taught in a LibreLingo skill. + +### Notes: + +*in_source_language*: List of accepted forms in the target language of the +course. The first item in the list is the main form. The main form is the +only form that is shown in the course but all forms are accepted as +answers. + +*in_target_language*: List of accepted forms in the target language of the +course. The first item in the list is the main form. The main form is the +only form that is shown in the course but all forms are accepted as +answers. + +### Usage example: + +>>> Word( +... in_target_language=["perro"], +... in_source_language=["dog"], +... pictures=["dog1", "dog2", "dog3"] +... ) +Word(in_target_language=['perro'], in_source_language=['dog'], pictures=['dog1', 'dog2', 'dog3']) + +<a name="librelingo_types.data_types.Phrase"></a> +## Phrase Objects + +```python +class Phrase( + namedtuple( + "Phrase", + [ + "in_target_language", + "in_source_language", + ], + )) +``` + +A new phrase taught in a LibreLingo skill. + +### Notes: + +*in_source_language*: List of accepted forms in the target language of the +course. The first item in the list is the main form. The main form is the +only form that is shown in the course but all forms are accepted as +answers. + +*in_target_language*: List of accepted forms in the target language of the +course. The first item in the list is the main form. The main form is the +only form that is shown in the course but all forms are accepted as +answers. + +### Usage example: + +>>> Phrase( +... in_target_language=["perro", "can"], +... in_source_language=["dog"], +... ) +Phrase(in_target_language=['perro', 'can'], in_source_language=['dog']) + +<a name="librelingo_types.data_types.DictionaryItem"></a> +## DictionaryItem Objects + +```python +class DictionaryItem( + namedtuple("DictionaryItem", ["word", "definition", "is_in_target_language"])) +``` + +A dictionary item for a LibreLingo course. It contains the definition of +a word. The word can be either in the source language or the target +language. + +Definition in the source language (Spanish in this case) +>>> DictionaryItem("hablo", "I speak", False) +DictionaryItem(word='hablo', definition='I speak', is_in_target_language=False) + +Definition in the target language (English in this case) +>>> DictionaryItem("speak", "hablo", True) +DictionaryItem(word='speak', definition='hablo', is_in_target_language=True) + +<a name="librelingo_types.data_types.PhraseIdentity"></a> +## PhraseIdentity Objects + +```python +class PhraseIdentity(namedtuple("PhraseIdentity", ["text", "source"])) +``` + +This is the set of information that identifies a phrase as 'the same'. If any +of these things change, the phrase will be seen as 'new' and re-generated. + + + +%package -n python3-librelingo-types +Summary: Data types to be used in Python packages for LibreLingo +Provides: python-librelingo-types +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-librelingo-types +<a name="librelingo_types"></a> +# librelingo\_types + +Data types to be used in Python packages for LibreLingo + +<a name="librelingo_types.data_types"></a> +# librelingo\_types.data\_types + +<a name="librelingo_types.data_types.TextToSpeechSettings"></a> +## TextToSpeechSettings Objects + +```python +class TextToSpeechSettings( + namedtuple( + "TextToSpeechSettings", + [ + "provider", + "voice", + "engine", + ], + defaults=["Polly", "Lupe", "standard"], + )) +``` + +Settings about how to use TTS to generate audios + +### Usage example: + +>>> TextToSpeechSettings( +... provider="Polly", +... voice="Aditi", +... engine="standard" +... ) +TextToSpeechSettings(provider='Polly', voice='Aditi', engine='standard') + +<a name="librelingo_types.data_types.AudioSettings"></a> +## AudioSettings Objects + +```python +class AudioSettings( + namedtuple( + "AudioSettings", + [ + "enabled", + "text_to_speech_settings_list", + ], + defaults=[False, []], + )) +``` + +Settings for audio in a course + +### Usage example: + +>>> AudioSettings( +... enabled=True, +... text_to_speech_settings_list=[TextToSpeechSettings()] +... ) +AudioSettings(enabled=True, text_to_speech_settings_list=[TextToSpeechSettings(provider='Polly', voice='Lupe', engine='standard')]) + +<a name="librelingo_types.data_types.HunspellSettings"></a> +## HunspellSettings Objects + +```python +class HunspellSettings( + namedtuple( + "HunspellSettings", + [ + "source_language", + "target_language", + ], + defaults=[None, None], + )) +``` + +Settings for hunspell spell checking + +### Usage example: + +>>> HunspellSettings( +... source_language="en-US", +... target_language="es-ES", +... ) +HunspellSettings(source_language='en-US', target_language='es-ES') + +<a name="librelingo_types.data_types.Settings"></a> +## Settings Objects + +```python +class Settings( + namedtuple( + "Settings", + ["audio_settings", "hunspell"], + defaults=[AudioSettings(), HunspellSettings()], + )) +``` + +Settings for a course + +### Usage example: + +>>> Settings() +Settings(audio_settings=AudioSettings(enabled=False, text_to_speech_settings_list=[]), hunspell=HunspellSettings(source_language=None, target_language=None)) + +<a name="librelingo_types.data_types.Course"></a> +## Course Objects + +```python +class Course( + namedtuple( + "Course", + [ + "target_language", + "source_language", + "special_characters", + "modules", + "license", + "dictionary", + "repository_url", + "course_dir", + "settings", + ], + defaults=[Settings()], + )) +``` + +A LibreLingo course + +### Usage example: + +```python +my_course = Course( + target_language=Language("English", "en"), + source_language=Language("Spanish", "es"), + special_characters=[], + modules=[module1, module2, module3, module4], + license=License( + full_name="Attribution 4.0 International (CC BY 4.0)", + name="CC BY 4.0", + link="https://creativecommons.org/licenses/by/4.0/" + ), + dictionary=[dict_item1, dict_item2, dict_item3, dict_item4], + repository_url="https://example.com", + course_dir="some_language/course", + settings=Settings() +) +``` + +<a name="librelingo_types.data_types.Language"></a> +## Language Objects + +```python +class Language(namedtuple("Language", ["name", "code"])) +``` + +Metadata about a language + +### Usage example: + +>>> Language("English", "en") +Language(name='English', code='en') + +<a name="librelingo_types.data_types.License"></a> +## License Objects + +```python +class License( + namedtuple( + "License", + [ + "name", + "full_name", + "link", + ], + )) +``` + +Metadata about the license of a LibreLingo course + +### Usage example: + +>>> License( +... full_name="Attribution 4.0 International (CC BY 4.0)", +... name="CC BY 4.0", +... link="https://creativecommons.org/licenses/by/4.0/" +... ) +License(name='CC BY 4.0', full_name='Attribution 4.0 International (CC BY 4.0)', link='https://creativecommons.org/licenses/by/4.0/') + +<a name="librelingo_types.data_types.Module"></a> +## Module Objects + +```python +class Module( + namedtuple( + "Module", + [ + "title", + "filename", + "skills", + ], + )) +``` + +A module of a LibreLingo course. + +### Usage examples: + +```python +my_module = Module(title="Basics", filename="basic/module.yaml", skills=[skill1, skill2]) +``` + +<a name="librelingo_types.data_types.Skill"></a> +## Skill Objects + +```python +class Skill( + namedtuple( + "Skill", + [ + "name", + "filename", + "id", + "words", + "phrases", + "image_set", + "dictionary", + "introduction", + ], + )) +``` + +A skill of a module of a LibreLingo course. + +### Notes: + +*id*: Needs to be a unique ID. Use uuidv4. + +### Usage examples: + +```python +my_skill = Skill( + name="Animals", + filename="basic/skills/hello.yaml", + id="3adc78da-ea42-4ecd-9e3d-2e0986a3b914", + words=[word1, word2, word3], + phrases=[phrases1, phrases2, phrases3], + image_set=["cat1", "dog2", "horse1"], + dictionary=[dict_item_1, dict_item_2, dict_item_3, dict_item_4], + introduction="My *markdown* text", +) +``` + +<a name="librelingo_types.data_types.Word"></a> +## Word Objects + +```python +class Word( + namedtuple( + "Word", + [ + "in_target_language", + "in_source_language", + "pictures", + ], + )) +``` + +A new word taught in a LibreLingo skill. + +### Notes: + +*in_source_language*: List of accepted forms in the target language of the +course. The first item in the list is the main form. The main form is the +only form that is shown in the course but all forms are accepted as +answers. + +*in_target_language*: List of accepted forms in the target language of the +course. The first item in the list is the main form. The main form is the +only form that is shown in the course but all forms are accepted as +answers. + +### Usage example: + +>>> Word( +... in_target_language=["perro"], +... in_source_language=["dog"], +... pictures=["dog1", "dog2", "dog3"] +... ) +Word(in_target_language=['perro'], in_source_language=['dog'], pictures=['dog1', 'dog2', 'dog3']) + +<a name="librelingo_types.data_types.Phrase"></a> +## Phrase Objects + +```python +class Phrase( + namedtuple( + "Phrase", + [ + "in_target_language", + "in_source_language", + ], + )) +``` + +A new phrase taught in a LibreLingo skill. + +### Notes: + +*in_source_language*: List of accepted forms in the target language of the +course. The first item in the list is the main form. The main form is the +only form that is shown in the course but all forms are accepted as +answers. + +*in_target_language*: List of accepted forms in the target language of the +course. The first item in the list is the main form. The main form is the +only form that is shown in the course but all forms are accepted as +answers. + +### Usage example: + +>>> Phrase( +... in_target_language=["perro", "can"], +... in_source_language=["dog"], +... ) +Phrase(in_target_language=['perro', 'can'], in_source_language=['dog']) + +<a name="librelingo_types.data_types.DictionaryItem"></a> +## DictionaryItem Objects + +```python +class DictionaryItem( + namedtuple("DictionaryItem", ["word", "definition", "is_in_target_language"])) +``` + +A dictionary item for a LibreLingo course. It contains the definition of +a word. The word can be either in the source language or the target +language. + +Definition in the source language (Spanish in this case) +>>> DictionaryItem("hablo", "I speak", False) +DictionaryItem(word='hablo', definition='I speak', is_in_target_language=False) + +Definition in the target language (English in this case) +>>> DictionaryItem("speak", "hablo", True) +DictionaryItem(word='speak', definition='hablo', is_in_target_language=True) + +<a name="librelingo_types.data_types.PhraseIdentity"></a> +## PhraseIdentity Objects + +```python +class PhraseIdentity(namedtuple("PhraseIdentity", ["text", "source"])) +``` + +This is the set of information that identifies a phrase as 'the same'. If any +of these things change, the phrase will be seen as 'new' and re-generated. + + + +%package help +Summary: Development documents and examples for librelingo-types +Provides: python3-librelingo-types-doc +%description help +<a name="librelingo_types"></a> +# librelingo\_types + +Data types to be used in Python packages for LibreLingo + +<a name="librelingo_types.data_types"></a> +# librelingo\_types.data\_types + +<a name="librelingo_types.data_types.TextToSpeechSettings"></a> +## TextToSpeechSettings Objects + +```python +class TextToSpeechSettings( + namedtuple( + "TextToSpeechSettings", + [ + "provider", + "voice", + "engine", + ], + defaults=["Polly", "Lupe", "standard"], + )) +``` + +Settings about how to use TTS to generate audios + +### Usage example: + +>>> TextToSpeechSettings( +... provider="Polly", +... voice="Aditi", +... engine="standard" +... ) +TextToSpeechSettings(provider='Polly', voice='Aditi', engine='standard') + +<a name="librelingo_types.data_types.AudioSettings"></a> +## AudioSettings Objects + +```python +class AudioSettings( + namedtuple( + "AudioSettings", + [ + "enabled", + "text_to_speech_settings_list", + ], + defaults=[False, []], + )) +``` + +Settings for audio in a course + +### Usage example: + +>>> AudioSettings( +... enabled=True, +... text_to_speech_settings_list=[TextToSpeechSettings()] +... ) +AudioSettings(enabled=True, text_to_speech_settings_list=[TextToSpeechSettings(provider='Polly', voice='Lupe', engine='standard')]) + +<a name="librelingo_types.data_types.HunspellSettings"></a> +## HunspellSettings Objects + +```python +class HunspellSettings( + namedtuple( + "HunspellSettings", + [ + "source_language", + "target_language", + ], + defaults=[None, None], + )) +``` + +Settings for hunspell spell checking + +### Usage example: + +>>> HunspellSettings( +... source_language="en-US", +... target_language="es-ES", +... ) +HunspellSettings(source_language='en-US', target_language='es-ES') + +<a name="librelingo_types.data_types.Settings"></a> +## Settings Objects + +```python +class Settings( + namedtuple( + "Settings", + ["audio_settings", "hunspell"], + defaults=[AudioSettings(), HunspellSettings()], + )) +``` + +Settings for a course + +### Usage example: + +>>> Settings() +Settings(audio_settings=AudioSettings(enabled=False, text_to_speech_settings_list=[]), hunspell=HunspellSettings(source_language=None, target_language=None)) + +<a name="librelingo_types.data_types.Course"></a> +## Course Objects + +```python +class Course( + namedtuple( + "Course", + [ + "target_language", + "source_language", + "special_characters", + "modules", + "license", + "dictionary", + "repository_url", + "course_dir", + "settings", + ], + defaults=[Settings()], + )) +``` + +A LibreLingo course + +### Usage example: + +```python +my_course = Course( + target_language=Language("English", "en"), + source_language=Language("Spanish", "es"), + special_characters=[], + modules=[module1, module2, module3, module4], + license=License( + full_name="Attribution 4.0 International (CC BY 4.0)", + name="CC BY 4.0", + link="https://creativecommons.org/licenses/by/4.0/" + ), + dictionary=[dict_item1, dict_item2, dict_item3, dict_item4], + repository_url="https://example.com", + course_dir="some_language/course", + settings=Settings() +) +``` + +<a name="librelingo_types.data_types.Language"></a> +## Language Objects + +```python +class Language(namedtuple("Language", ["name", "code"])) +``` + +Metadata about a language + +### Usage example: + +>>> Language("English", "en") +Language(name='English', code='en') + +<a name="librelingo_types.data_types.License"></a> +## License Objects + +```python +class License( + namedtuple( + "License", + [ + "name", + "full_name", + "link", + ], + )) +``` + +Metadata about the license of a LibreLingo course + +### Usage example: + +>>> License( +... full_name="Attribution 4.0 International (CC BY 4.0)", +... name="CC BY 4.0", +... link="https://creativecommons.org/licenses/by/4.0/" +... ) +License(name='CC BY 4.0', full_name='Attribution 4.0 International (CC BY 4.0)', link='https://creativecommons.org/licenses/by/4.0/') + +<a name="librelingo_types.data_types.Module"></a> +## Module Objects + +```python +class Module( + namedtuple( + "Module", + [ + "title", + "filename", + "skills", + ], + )) +``` + +A module of a LibreLingo course. + +### Usage examples: + +```python +my_module = Module(title="Basics", filename="basic/module.yaml", skills=[skill1, skill2]) +``` + +<a name="librelingo_types.data_types.Skill"></a> +## Skill Objects + +```python +class Skill( + namedtuple( + "Skill", + [ + "name", + "filename", + "id", + "words", + "phrases", + "image_set", + "dictionary", + "introduction", + ], + )) +``` + +A skill of a module of a LibreLingo course. + +### Notes: + +*id*: Needs to be a unique ID. Use uuidv4. + +### Usage examples: + +```python +my_skill = Skill( + name="Animals", + filename="basic/skills/hello.yaml", + id="3adc78da-ea42-4ecd-9e3d-2e0986a3b914", + words=[word1, word2, word3], + phrases=[phrases1, phrases2, phrases3], + image_set=["cat1", "dog2", "horse1"], + dictionary=[dict_item_1, dict_item_2, dict_item_3, dict_item_4], + introduction="My *markdown* text", +) +``` + +<a name="librelingo_types.data_types.Word"></a> +## Word Objects + +```python +class Word( + namedtuple( + "Word", + [ + "in_target_language", + "in_source_language", + "pictures", + ], + )) +``` + +A new word taught in a LibreLingo skill. + +### Notes: + +*in_source_language*: List of accepted forms in the target language of the +course. The first item in the list is the main form. The main form is the +only form that is shown in the course but all forms are accepted as +answers. + +*in_target_language*: List of accepted forms in the target language of the +course. The first item in the list is the main form. The main form is the +only form that is shown in the course but all forms are accepted as +answers. + +### Usage example: + +>>> Word( +... in_target_language=["perro"], +... in_source_language=["dog"], +... pictures=["dog1", "dog2", "dog3"] +... ) +Word(in_target_language=['perro'], in_source_language=['dog'], pictures=['dog1', 'dog2', 'dog3']) + +<a name="librelingo_types.data_types.Phrase"></a> +## Phrase Objects + +```python +class Phrase( + namedtuple( + "Phrase", + [ + "in_target_language", + "in_source_language", + ], + )) +``` + +A new phrase taught in a LibreLingo skill. + +### Notes: + +*in_source_language*: List of accepted forms in the target language of the +course. The first item in the list is the main form. The main form is the +only form that is shown in the course but all forms are accepted as +answers. + +*in_target_language*: List of accepted forms in the target language of the +course. The first item in the list is the main form. The main form is the +only form that is shown in the course but all forms are accepted as +answers. + +### Usage example: + +>>> Phrase( +... in_target_language=["perro", "can"], +... in_source_language=["dog"], +... ) +Phrase(in_target_language=['perro', 'can'], in_source_language=['dog']) + +<a name="librelingo_types.data_types.DictionaryItem"></a> +## DictionaryItem Objects + +```python +class DictionaryItem( + namedtuple("DictionaryItem", ["word", "definition", "is_in_target_language"])) +``` + +A dictionary item for a LibreLingo course. It contains the definition of +a word. The word can be either in the source language or the target +language. + +Definition in the source language (Spanish in this case) +>>> DictionaryItem("hablo", "I speak", False) +DictionaryItem(word='hablo', definition='I speak', is_in_target_language=False) + +Definition in the target language (English in this case) +>>> DictionaryItem("speak", "hablo", True) +DictionaryItem(word='speak', definition='hablo', is_in_target_language=True) + +<a name="librelingo_types.data_types.PhraseIdentity"></a> +## PhraseIdentity Objects + +```python +class PhraseIdentity(namedtuple("PhraseIdentity", ["text", "source"])) +``` + +This is the set of information that identifies a phrase as 'the same'. If any +of these things change, the phrase will be seen as 'new' and re-generated. + + + +%prep +%autosetup -n librelingo_types-3.3.0 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "\"/%h/%f\"\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "\"/%h/%f\"\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "\"/%h/%f\"\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "\"/%h/%f\"\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "\"/%h/%f.gz\"\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-librelingo-types -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Tue Jun 20 2023 Python_Bot <Python_Bot@openeuler.org> - 3.3.0-1 +- Package Spec generated @@ -0,0 +1 @@ +397e896f7679763970c793818c10881d librelingo_types-3.3.0.tar.gz |