From e55fc861baf100dcb7f15689fd30e858c0006712 Mon Sep 17 00:00:00 2001 From: Arpita kesharwani <107834813+KesharwaniArpita@users.noreply.github.com> Date: Thu, 17 Oct 2024 11:05:37 +0530 Subject: [PATCH] Create generate_emoji_keywords.py --- .../emoji_keywords/generate_emoji_keywords.py | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 src/scribe_data/language_data_extraction/Punjabi/Shahmukhi/emoji_keywords/generate_emoji_keywords.py diff --git a/src/scribe_data/language_data_extraction/Punjabi/Shahmukhi/emoji_keywords/generate_emoji_keywords.py b/src/scribe_data/language_data_extraction/Punjabi/Shahmukhi/emoji_keywords/generate_emoji_keywords.py new file mode 100644 index 000000000..e0a034aff --- /dev/null +++ b/src/scribe_data/language_data_extraction/Punjabi/Shahmukhi/emoji_keywords/generate_emoji_keywords.py @@ -0,0 +1,57 @@ +""" +* 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 . +""" + +import argparse +from scribe_data.unicode.generate_emoji_keyword import generate_emoji_keyword + +# Define the main language +LANGUAGE = "Punjabi" # Change to a grouped language if needed +emojis_per_keyword = 3 + +# Set up the argument parser +parser = argparse.ArgumentParser( + description="Generate emoji keywords for a specific language." +) +parser.add_argument( + "--file-path", required=True, help="Path to save the generated emoji keywords." +) +parser.add_argument( + "--sub-languages", + nargs="*", + help="List of specific sub-languages to process. If omitted, all sub-languages will be processed.", +) +parser.add_argument( + "--gender", + choices=["male", "female", "neutral"], + help="Specify the gender for emoji customization.", +) +parser.add_argument( + "--region", help="Specify the region for emoji customization." +) + +# Parse the command-line arguments +args = parser.parse_args() + +# Call the generate_emoji_keyword function with optional parameters +generate_emoji_keyword( + LANGUAGE, + emojis_per_keyword, + args.file_path, + gender=args.gender, + region=args.region, + sub_languages=args.sub_languages, +)