3Stark123's picture
Create examples/sample_texts.py
a42002a verified
"""
Sample texts for testing and examples
"""
SAMPLE_TEXTS = {
"business_report": """
Quarterly Business Performance Report
Our company has shown remarkable growth in Q3 2024, with revenue increasing by 25% compared to the previous quarter.
Key Achievements:
- Revenue reached $2.5 million, surpassing our target by 15%
- Customer acquisition increased by 40% with 1,200 new customers
- Employee satisfaction improved to 4.2/5.0
- Market share expanded to 12% in our target demographic
Challenges and Opportunities:
The main challenges we faced included supply chain disruptions and increased competition. However, these challenges have opened new opportunities for innovation and strategic partnerships.
Future Outlook:
We project continued growth in Q4, with an estimated revenue increase of 20%. Our focus will be on digital transformation and customer experience enhancement.
""",
"technology_overview": """
Artificial Intelligence: Transforming the Future
Artificial Intelligence (AI) is revolutionizing industries across the globe. From healthcare to finance, AI technologies are enabling unprecedented levels of automation and insight.
Key AI Technologies:
- Machine Learning: Algorithms that improve through experience
- Natural Language Processing: Understanding and generating human language
- Computer Vision: Interpreting and analyzing visual information
- Robotics: Physical AI systems that interact with the world
Current Applications:
AI is currently being used in medical diagnosis, autonomous vehicles, financial trading, and personalized recommendations. These applications are saving time, reducing costs, and improving outcomes.
Future Implications:
By 2030, AI is expected to contribute $13 trillion to the global economy. This transformation will create new job categories while making others obsolete, requiring significant workforce adaptation.
""",
"health_wellness": """
The Science of Healthy Living
Maintaining good health requires a holistic approach that encompasses physical activity, nutrition, mental well-being, and adequate rest.
Physical Activity Benefits:
- Reduces risk of heart disease by 35%
- Improves mental health and reduces anxiety
- Strengthens bones and muscles
- Enhances cognitive function
Nutrition Essentials:
A balanced diet should include 5-9 servings of fruits and vegetables daily, lean proteins, whole grains, and healthy fats. Proper hydration requires 8-10 glasses of water per day.
Mental Well-being:
Stress management through meditation, social connections, and hobby engagement significantly impacts overall health. Studies show that chronic stress can reduce life expectancy by 2-3 years.
Sleep Quality:
Adults need 7-9 hours of quality sleep nightly. Poor sleep is linked to obesity, diabetes, and cardiovascular disease.
""",
"environmental_impact": """
Climate Change: Understanding Our Environmental Impact
Climate change represents one of the most pressing challenges of our time, with global temperatures rising at an unprecedented rate.
Current Statistics:
- Global temperature has increased by 1.1°C since pre-industrial times
- CO2 levels have reached 415 ppm, the highest in 3 million years
- Arctic sea ice is declining at a rate of 13% per decade
- Ocean pH has decreased by 0.1 units due to acidification
Major Contributors:
Fossil fuel combustion accounts for 75% of greenhouse gas emissions. Deforestation contributes 18%, while agriculture and livestock produce 14% of global emissions.
Solutions and Actions:
Renewable energy adoption, energy efficiency improvements, sustainable transportation, and reforestation can significantly reduce our carbon footprint. Individual actions like reducing energy consumption and sustainable lifestyle choices also make a difference.
Future Projections:
Without intervention, global temperatures could rise by 3-5°C by 2100, causing severe ecological and economic disruption.
""",
"education_trends": """
The Future of Education: Digital Transformation
Education is undergoing a radical transformation driven by technology, changing student needs, and evolving workplace requirements.
Current Trends:
- Online learning has grown by 300% since 2020
- 73% of students prefer blended learning approaches
- Virtual reality is being used in 15% of educational institutions
- AI tutoring systems show 30% improvement in learning outcomes
Key Technologies:
Personalized learning platforms adapt to individual student needs. Virtual classrooms enable global collaboration. AI assessment tools provide instant feedback and identify learning gaps.
Skills for the Future:
Critical thinking, creativity, digital literacy, and emotional intelligence are becoming essential. Traditional memorization-based learning is being replaced by problem-solving and collaborative approaches.
Challenges and Opportunities:
Digital divide issues affect 21% of students globally. However, technology also democratizes access to quality education and enables lifelong learning opportunities.
"""
}
def get_sample_text(category: str = "business_report") -> str:
"""Get sample text by category"""
return SAMPLE_TEXTS.get(category, SAMPLE_TEXTS["business_report"])
def get_all_categories() -> list:
"""Get all available sample text categories"""
return list(SAMPLE_TEXTS.keys())
def get_random_sample() -> str:
"""Get a random sample text"""
import random
category = random.choice(list(SAMPLE_TEXTS.keys()))
return SAMPLE_TEXTS[category]