feat: Add the Python project

This commit is contained in:
2025-05-09 10:22:35 +08:00
parent bb8e91b9d8
commit f1d18ec989
14 changed files with 2179 additions and 0 deletions

69
data/names.json Normal file
View File

@@ -0,0 +1,69 @@
{
"persons_titles": ["Mr.", "Ms.", "Engr.", "Dr.", "Prof."],
"persons_first_names": [
"James", "Mary", "John", "Patricia", "Robert", "Jennifer", "Michael", "Linda",
"William", "Elizabeth", "David", "Barbara", "Richard", "Susan", "Joseph", "Jessica",
"Thomas", "Sarah", "Charles", "Karen", "Christopher", "Nancy", "Daniel", "Lisa",
"Matthew", "Betty", "Anthony", "Margaret", "Mark", "Sandra", "Juan", "Maria",
"Jose", "Ana", "Carlos", "Sofia"
],
"persons_last_names": [
"Smith", "Johnson", "Williams", "Brown", "Jones", "Garcia", "Miller", "Davis",
"Rodriguez", "Martinez", "Hernandez", "Lopez", "Gonzalez", "Wilson", "Anderson",
"Thomas", "Taylor", "Moore", "Jackson", "Martin", "Lee", "Perez", "Thompson",
"White", "Harris", "Sanchez", "Clark", "Ramirez", "Lewis", "Robinson", "Walker",
"Young", "Allen", "King", "Wright", "Scott", "Green", "Baker", "Adams", "Nelson",
"Hill", "Campbell", "Mitchell", "Roberts", "Carter", "Phillips", "Evans", "Turner",
"Torres", "Parker", "Collins", "Edwards", "Stewart", "Flores", "Morris", "Nguyen",
"Murphy", "Rivera", "Cook", "Rogers", "Morgan", "Peterson", "Cooper", "Reed",
"Bailey", "Bell", "Gomez", "Kelly", "Howard", "Ward", "Cox", "Diaz", "Richardson",
"Wood", "Watson", "Brooks", "Bennett", "Gray", "James", "Reyes", "Cruz", "Hughes",
"Price", "Myers", "Long", "Foster", "Sanders", "Ross", "Morales", "Powell",
"Sullivan", "Russell", "Ortiz", "Jenkins", "Gutierrez", "Perry", "Butler",
"Barnes", "Fisher", "Henderson", "Coleman", "Simmons", "Patterson", "Jordan",
"Reynolds", "Hamilton", "Graham", "Kim", "Gonzales", "Alexander", "Ramos",
"Wallace", "Griffin", "West", "Cole", "Hayes", "Chavez", "Gibson", "Bryant",
"Ellis", "Stevens", "Murray", "Ford", "Marshall", "Owens", "McDonald", "Harrison",
"Ruiz", "Kennedy", "Wells", "Alvarez", "Woods", "Mendoza", "Castillo", "Olson",
"Webb", "Washington", "Tucker", "Freeman", "Burns", "Henry", "Vasquez", "Snyder",
"Simpson", "Crawford", "Jimenez", "Porter", "Mason", "Shaw", "Gordon", "Wagner",
"Hunter", "Romero", "Hicks", "Dixon", "Hunt", "Palmer", "Robertson", "Black",
"Holmes", "Stone", "Meyer", "Boyd", "Mills", "Warren", "Fox", "Rose", "Rice",
"Moreno", "Schmidt", "Patel", "Ferguson", "Nichols", "Herrera", "Medina",
"Ryan", "Fernandez", "Weaver", "Daniels", "Stephens", "Gardner", "Payne",
"Kelley", "Dunn", "Pierce", "Arnold", "Tran", "Spencer", "Peters", "Hawkins",
"Grant", "Hansen", "Castro", "Hoffman", "Hart", "Elliott", "Cunningham",
"Knight", "Bradley", "Santos"
],
"companies_generic_prefix": [
"Apex", "Vertex", "Zenith", "Nova", "Orion", "Quantum", "Synergy", "Global",
"United", "Dynamic", "Prime", "Core", "Alpha", "Beta", "Omega", "Delta",
"Stellar", "Pinnacle", "Summit", "Horizon", "Matrix", "Nexus", "Catalyst"
],
"companies_generic_suffix": [
"Solutions", "Enterprises", "Group", "Corp.", "Inc.", "LLC", "Technologies",
"Systems", "Dynamics", "Innovations", "Ventures", "Holdings", "Logistics",
"Manufacturing", "Consulting", "Services", "Industries", "Partners"
],
"companies_industry_specific": {
"finance": ["Capital", "Financial", "Investment Group", "Bank", "Credit Union"],
"tech": ["Tech", "Software", "Digital", "Cybernetics", "AI Solutions"],
"construction": ["Builders", "Construction Co.", "Development", "Contractors"],
"retail": ["Goods", "Emporium", "Mart", "Retailers", "Supply Co."]
},
"items_loan_general": [
"a business expansion", "a new equipment purchase", "a property acquisition",
"working capital", "a personal project", "debt consolidation", "a vehicle",
"home improvement", "education fees", "a startup venture"
],
"items_investment_general": [
"stocks", "bonds", "a mutual fund", "real estate", "a new business",
"a savings account", "a certificate of deposit", "a retirement fund",
"a tech startup", "a portfolio of assets"
],
"project_names": [
"Project Alpha", "The Phoenix Initiative", "Operation Starlight", "Blue Sky Project",
"Quantum Leap Program", "Project Chimera", "The Vanguard Project", "Odyssey Plan",
"Project Nova", "Titan Development"
]
}

127
data/text_snippets.json Normal file
View File

@@ -0,0 +1,127 @@
{
"actors_person": ["{person_title} {person_first_name} {person_last_name}", "{person_first_name} {person_last_name}", "{person_title} {person_last_name}"],
"actors_company": ["{company_prefix} {company_suffix}", "{company_prefix} {company_industry}"],
"actions_loan_present_singular": ["borrows", "takes out a loan for", "secures financing for", "needs a loan of", "is seeking a loan of"],
"actions_loan_present_plural": ["borrow", "take out a loan for", "secure financing for", "need a loan of", "are seeking a loan of"],
"actions_loan_past_singular": ["borrowed", "took out a loan for", "secured financing for", "received a loan of"],
"actions_loan_past_plural": ["borrowed", "took out a loan for", "secured financing for", "received a loan of"],
"actions_investment_present_singular": ["invests", "deposits", "puts", "plans to invest", "wants to deposit"],
"actions_investment_present_plural": ["invest", "deposit", "put", "plan to invest", "want to deposit"],
"actions_investment_past_singular": ["invested", "deposited", "put", "made an investment of"],
"actions_investment_past_plural": ["invested", "deposited", "put", "made an investment of"],
"actions_repayment_present_singular": ["repays", "settles", "amortizes", "makes a payment on"],
"actions_repayment_present_plural": ["repay", "settle", "amortize", "make a payment on"],
"actions_repayment_past_singular": ["repaid", "settled", "amortized", "made a payment on"],
"actions_repayment_past_plural": ["repaid", "settled", "amortized", "made a payment on"],
"actions_receive_present_singular": ["receives", "obtains", "gets", "is due to receive"],
"actions_receive_present_plural": ["receive", "obtain", "get", "are due to receive"],
"actions_receive_past_singular": ["received", "obtained", "got"],
"actions_receive_past_plural": ["received", "obtained", "got"],
"actions_earn_present_singular": ["earns", "accumulates", "yields"],
"actions_earn_present_plural": ["earn", "accumulate", "yield"],
"actions_earn_past_singular": ["earned", "accumulated", "yielded"],
"actions_earn_past_plural": ["earned", "accumulated", "yielded"],
"time_phrases_duration": ["for a period of", "over", "for", "during"],
"time_phrases_point": ["at the end of", "after", "in"],
"rate_phrases": ["at a rate of", "with an interest of", "at an annual rate of", "earning interest at"],
"compounding_phrases": ["compounded {compounding_frequency_adverb}", "with {compounding_frequency_adverb} compounding"],
"purpose_phrases_loan": ["for {item_loan}", "to finance {item_loan}", "to purchase {item_loan}"],
"purpose_phrases_investment": ["in {item_investment}", "into {item_investment}", "to grow their capital through {item_investment}"],
"question_starters_what_is": ["What is the", "Determine the", "Calculate the", "Find the", "What will be the", "What was the"],
"question_starters_how_much": ["How much is the", "How much will be the", "How much was the", "How much should be"],
"question_starters_how_long": ["How long will it take for", "How many years are needed for", "What is the time period for"],
"scenario_introductions": [
"Consider a scenario where {actor}",
"{actor} is planning to",
"Suppose {actor}",
"Imagine {actor} needs to"
],
"scenario_connectors": [
"The terms of the agreement state that",
"It is known that",
"Given that",
"Assuming that"
],
"scenario_closures_question_prefix": [
"Based on this information,",
"Therefore,",
"With these conditions,"
],
"solution_guidance": {
"identify_knowns": "First, let's identify the given values (knowns) in the problem:",
"state_formula": "The relevant formula for this problem is:",
"substitute_values": "Now, we substitute the known values into the formula:",
"perform_calculation": "Performing the calculation:",
"intermediate_step": "The intermediate result for {step_name} is:",
"final_answer_is": "Therefore, the {unknown_variable_description} is:",
"convert_time_to_years": "Convert the time period to years: {original_time_value} {original_time_unit} = {converted_time_value_years} years.",
"calculate_interest_rate_per_period": "Calculate the interest rate per compounding period (i): i = r / m = {nominal_rate_decimal} / {compounding_periods_per_year} = {interest_rate_per_period_decimal}.",
"calculate_total_periods": "Calculate the total number of compounding periods (n): n = t * m = {time_in_years} years * {compounding_periods_per_year} = {total_periods} periods.",
"check_leap_year": "{year} is {is_or_is_not} a leap year.",
"days_in_period": "The number of days from {start_date} to {end_date} is {number_of_days} days."
},
"variable_descriptions": {
"P": "principal amount",
"F": "future value",
"I": "interest amount",
"i_simple_annual": "annual simple interest rate",
"n_time_years": "time period in years",
"n_time_months": "time period in months",
"n_time_days": "time period in days",
"r_nominal_annual": "nominal annual interest rate",
"m_compounding_periods_per_year": "number of compounding periods per year",
"i_rate_per_period": "interest rate per compounding period",
"n_total_compounding_periods": "total number of compounding periods",
"ER": "effective interest rate",
"Db": "banker's discount amount",
"d_discount_rate": "discount rate",
"Proceeds": "proceeds from the loan",
"I_exact_simple": "exact simple interest amount",
"F_exact_simple": "future value with exact simple interest",
"I_ordinary_simple": "ordinary simple interest amount",
"F_ordinary_simple": "future value with ordinary simple interest",
"start_date": "start date of the period",
"end_date": "end date of the period",
"time_base_days": "day count basis for the year (time base)",
"n_time_years_fractional": "time period as a fraction of a year"
},
"solution_guidance": {
"identify_knowns": "First, let's identify the given values (knowns) in the problem:",
"state_formula": "The relevant formula for this problem is:",
"substitute_values": "Now, we substitute the known values into the formula:",
"perform_calculation": "Performing the calculation:",
"intermediate_step": "The intermediate result for {step_name} is:",
"final_answer_is": "Therefore, the {unknown_variable_description} is:",
"convert_time_to_years": "Convert the time period to years: {original_time_value} {original_time_unit} = {converted_time_value_years} years.",
"calculate_interest_rate_per_period": "Calculate the interest rate per compounding period (i): i = r / m = {nominal_rate_decimal} / {compounding_periods_per_year} = {interest_rate_per_period_decimal}.",
"calculate_total_periods": "Calculate the total number of compounding periods (n): n = t * m = {time_in_years} years * {compounding_periods_per_year} = {total_periods} periods.",
"check_leap_year": "{year} is {is_or_is_not} a leap year.",
"days_in_period": "The number of days from {start_date} to {end_date} is {number_of_days} days.",
"determine_time_base_exact": "For exact simple interest, the time base is the actual number of days in the reference year ({year}), which is {days_in_year} days.",
"determine_time_base_ordinary": "For ordinary simple interest, the time base is 360 days.",
"calculate_n_time_years_fractional": "Calculate the time as a fraction of a year (t_fractional): t_fractional = number of days / time base = {n_time_days} / {time_base_days} = {n_time_years_fractional_value}."
},
"compounding_frequency_adverbs": {
"annually": "annually",
"semi-annually": "semi-annually",
"quarterly": "quarterly",
"monthly": "monthly",
"bi-monthly": "bi-monthly",
"semi-monthly": "semi-monthly",
"continuously": "continuously"
}
}

137
data/value_ranges.json Normal file
View File

@@ -0,0 +1,137 @@
{
"principal": {
"min": 500,
"max": 200000,
"currency": "Php",
"decimals": 2,
"default_display_precision": 2
},
"loan_amount": {
"min": 1000,
"max": 500000,
"currency": "Php",
"decimals": 2,
"default_display_precision": 2
},
"investment_amount": {
"min": 100,
"max": 100000,
"currency": "Php",
"decimals": 2,
"default_display_precision": 2
},
"future_value": {
"min": 1000,
"max": 1000000,
"currency": "Php",
"decimals": 2,
"default_display_precision": 2
},
"interest_amount": {
"min": 50,
"max": 50000,
"currency": "Php",
"decimals": 2,
"default_display_precision": 2
},
"payment_amount": {
"min": 100,
"max": 50000,
"currency": "Php",
"decimals": 2,
"default_display_precision": 2
},
"simple_interest_rate_annual": {
"min": 0.02,
"max": 0.25,
"unit_display": "% per annum",
"internal_precision": 8,
"display_precision": 2
},
"compound_interest_rate_nominal": {
"min": 0.03,
"max": 0.18,
"unit_display": "%",
"internal_precision": 8,
"display_precision": 2
},
"discount_rate_bankers": {
"min": 0.05,
"max": 0.20,
"unit_display": "%",
"internal_precision": 8,
"display_precision": 2
},
"time_years": {
"min": 1,
"max": 20,
"unit": "years",
"integer": true,
"allow_fractional_if_months_also_present": true
},
"time_months": {
"min": 1,
"max": 48,
"unit": "months",
"integer": true
},
"time_days": {
"min": 10,
"max": 360,
"unit": "days",
"integer": true
},
"number_of_periods_general": {
"min": 2,
"max": 30,
"unit": "periods",
"integer": true
},
"loan_payment_count": {
"min": 2,
"max": 5,
"integer": true
},
"compounding_frequency_options": {
"annually": 1,
"semi-annually": 2,
"quarterly": 4,
"monthly": 12,
"bi-monthly": 6,
"semi-monthly": 24
},
"gradient_amount": {
"min": 100,
"max": 5000,
"currency": "Php",
"decimals": 2,
"default_display_precision": 2
},
"date_general": {
"description": "General date, used for start_date and end_date generation.",
"type": "date",
"min_year": 1990,
"max_year": 2030
},
"time_days_exact_ordinary": {
"description": "Number of days for exact/ordinary interest calculations (derived from dates).",
"type": "integer",
"min": 30,
"max": 730,
"unit": "days",
"display_precision": 0
},
"time_base_days_exact_ordinary": {
"description": "Time base in days for exact (365/366) or ordinary (360) interest.",
"type": "integer",
"options": [360, 365, 366],
"unit": "days",
"display_precision": 0
},
"time_years_fractional": {
"description": "Time period as a fraction of a year (calculated).",
"type": "float",
"unit": "years",
"display_precision": 6
}
}