-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #283 from KesharwaniArpita/EmojiKeywordsContriArpita
Created keyword-emoji relationship Python file for Basque
- Loading branch information
Showing
2 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
src/scribe_data/language_data_extraction/Basque/emoji_keywords/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
46 changes: 46 additions & 0 deletions
46
src/scribe_data/language_data_extraction/Basque/emoji_keywords/generate_emoji_keywords.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
""" | ||
Generates keyword-emoji relationships from a selection of Basque words. | ||
.. raw:: html | ||
<!-- | ||
* Copyright (C) 2024 Scribe | ||
* | ||
* 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/>. | ||
--> | ||
""" | ||
|
||
import argparse | ||
|
||
from scribe_data.unicode.process_unicode import gen_emoji_lexicon | ||
from scribe_data.utils import export_formatted_data | ||
|
||
LANGUAGE = "Basque" | ||
DATA_TYPE = "emoji-keywords" | ||
emojis_per_keyword = 3 | ||
|
||
parser = argparse.ArgumentParser() | ||
parser.add_argument("--file-path") | ||
args = parser.parse_args() | ||
|
||
if emoji_keywords_dict := gen_emoji_lexicon( | ||
language=LANGUAGE, | ||
emojis_per_keyword=emojis_per_keyword, | ||
): | ||
export_formatted_data( | ||
file_path=args.file_path, | ||
formatted_data=emoji_keywords_dict, | ||
query_data_in_use=True, | ||
language=LANGUAGE, | ||
data_type=DATA_TYPE, | ||
) |