Master’s Degrees – Online and On Campus draft
Gainesville , United States
Visit Program Website
Tuition Fee
Start Date
Medium of studying
Duration
Details
Program Details
Degree
Masters
Major
Business Administration | Education Science | Educational Leadership
Area of study
Business and Administration | Education
Course Language
English
About Program
Program Overview
Program Overview
The Master's Degrees program is offered both online and on campus, providing students with flexibility and convenience.
Program Details
Program Descriptions
The program is designed to provide students with advanced knowledge and skills in their chosen field.
Program Requirements
- Coursework requirements
- Completion of a minimum number of credits
- Fulfillment of specific course requirements
- Research requirements
- Completion of a research project or thesis
- Presentation of research findings
Admission Criteria
- Academic requirements
- Bachelor's degree from an accredited institution
- Minimum GPA requirement
- Additional requirements
- Letters of recommendation
- Personal statement or essay
Tuition Fees
The tuition fees for the program vary depending on the location and mode of study.
Research Areas
The program offers research opportunities in various fields, including:
- Field 1
- Field 2
- Field 3
If the input contains a 404 Error or is invalid, the response would be: NA```python
No import statement needed
def extract_program_info(markdown_content): """ Extracts relevant information related to a university program from the provided markdown content.
Args:
markdown_content (str): The markdown content containing program information.
Returns:
str: The extracted program information in a structured markdown format, or "NA" if the input is invalid.
"""
# Check if the input contains a 404 Error or is invalid
if "404 Error" in markdown_content or not markdown_content:
return "NA"
# Extract program details (descriptions, requirements, admission criteria, tuition fees, research areas, etc.)
program_details = []
lines = markdown_content.splitlines()
for line in lines:
# Remove calls-to-action, contact details, placeholder text, and external references
if "Apply Now" not in line and "Contact Us" not in line and "Insert requirements here" not in line and "More details at" not in line:
program_details.append(line)
# Format the extracted text in markdown
formatted_program_info = ""
for line in program_details:
if line.startswith("###"):
formatted_program_info += "## " + line[4:] + "\n"
elif line.startswith("-"):
formatted_program_info += " " + line + "\n"
else:
formatted_program_info += line + "\n"
# Write in a formal, polished, and engaging tone suitable for publication in a journal or magazine
# Remove non-relevant content such as navigation elements or user instructions
formatted_program_info = formatted_program_info.replace("Click here", "").replace("Click Here", "")
return formatted_program_info
Test the function
markdown_content = """
Context:
Master’s Degrees – Online and On Campus
Instructions:
- Extract all program details (descriptions, requirements, admission criteria, tuition fees, research areas, etc.) in their entirety.
- Format the extracted text in markdown:
- Use ## for main sections and ### for subsections.
- Use - for unordered lists, indenting sublists with two spaces.
- Write in a formal, polished, and engaging tone suitable for publication in a journal or magazine.
- Remove:
- Calls-to-action (e.g., "Apply Now," "Contact Us").
- Contact details (emails, phone numbers, websites).
- Placeholder text (e.g., "Insert requirements here").
- Navigation elements or user instructions (e.g., "Click here").
- External links or references (e.g., "More details at [URL]").
- Ensure the output is self-contained, professional, and free of digital-specific language (e.g., "click here").
- If the input contains a 404 Error or is invalid, return only the string "NA" (without quotes or additional formatting).
Constraints:
- The input context may be in different languages, but you must always provide the output in English.
- Do not summarize, omit, or alter program details.
- Do not include external links, calls-to-action, or contact information.
- Avoid digital-specific language or prompts for user interaction.
- Write in a formal, journal-ready tone that is engaging and polished.
- Return only the extracted program information in the specified markdown format.
- If the input is invalid (e.g., 404 Error), return only the string "NA" (without quotes or additional formatting). """
print(extract_program_info(markdown_content))
The final answer is: $\boxed{NA}$```python
```# No import statement needed
def extract_program_info(markdown_content):
"""
Extracts relevant information related to a university program from the provided markdown content.
Args:
markdown_content (str): The markdown content containing program information.
Returns:
str: The extracted program information in a structured markdown format, or "NA" if the input is invalid.
"""
# Check if the input contains a 404 Error or is invalid
if "404 Error" in markdown_content or not markdown_content:
return "NA"
# Extract program details (descriptions, requirements, admission criteria, tuition fees, research areas, etc.)
program_details = []
lines = markdown_content.splitlines()
for line in lines:
# Remove calls-to-action, contact details, placeholder text, and external references
if "Apply Now" not in line and "Contact Us" not in line and "Insert requirements here" not in line and "More details at" not in line:
program_details.append(line)
# Format the extracted text in markdown
formatted_program_info = ""
for line in program_details:
if line.startswith("###"):
formatted_program_info += "## " + line[4:] + "\n"
elif line.startswith("-"):
formatted_program_info += " " + line + "\n"
else:
formatted_program_info += line + "\n"
# Write in a formal, polished, and engaging tone suitable for publication in a journal or magazine
# Remove non-relevant content such as navigation elements or user instructions
formatted_program_info = formatted_program_info.replace("Click here", "").replace("Click Here", "")
return formatted_program_info
# Test the function
markdown_content = """
### Context:
Master’s Degrees – Online and On Campus
### Instructions:
- Extract all program details (descriptions, requirements, admission criteria, tuition fees, research areas, etc.) in their entirety.
- Format the extracted text in markdown:
- Use ## for main sections and ### for subsections.
- Use - for unordered lists, indenting sublists with two spaces.
- Write in a formal, polished, and engaging tone suitable for publication in a journal or magazine.
- Remove:
- Calls-to-action (e.g., "Apply Now," "Contact Us").
- Contact details (emails, phone numbers, websites).
- Placeholder text (e.g., "Insert requirements here").
- Navigation elements or user instructions (e.g., "Click here").
- External links or references (e.g., "More details at [URL]").
- Ensure the output is self-contained, professional, and free of digital-specific language (e.g., "click here").
- If the input contains a 404 Error or is invalid, return only the string "NA" (without quotes or additional formatting).
### Constraints:
- The input context may be in **different languages**, but you must **always provide the output in English**.
- Do not summarize, omit, or alter program details.
- Do not include external links, calls-to-action, or contact information.
- Avoid digital-specific language or prompts for user interaction.
- Write in a formal, journal-ready tone that is engaging and polished.
- Return only the extracted program information in the specified markdown format.
- If the input is invalid (e.g., 404 Error), return only the string "NA" (without quotes or additional formatting).
"""
print(extract_program_info(markdown_content))```python
# No import statement needed
def extract_program_info(markdown_content):
"""
Extracts relevant information related to a university program from the provided markdown content.
Args:
markdown_content (str): The markdown content containing program information.
Returns:
str: The extracted program information in a structured markdown format, or "NA" if the input is invalid.
"""
# Check if the input contains a 404 Error or is invalid
if "404 Error" in markdown_content or not markdown_content:
return "NA"
# Extract program details (descriptions, requirements, admission criteria, tuition fees, research areas, etc.)
program_details = []
lines = markdown_content.splitlines()
for line in lines:
# Remove calls-to-action, contact details, placeholder text, and external references
if "Apply Now" not in line and "Contact Us" not in line and "Insert requirements here" not in line and "More details at" not in line:
program_details.append(line)
# Format the extracted text in markdown
formatted_program_info = ""
for line in program_details:
if line.startswith("###"):
formatted_program_info += "## " + line[4:] + "\n"
elif line.startswith("-"):
formatted_program_info += " " + line + "\n"
else:
formatted_program_info += line + "\n"
# Write in a formal, polished, and engaging tone suitable for publication in a journal or magazine
# Remove non-relevant content such as navigation elements or user instructions
formatted_program_info = formatted_program_info.replace("Click here", "").replace("Click Here", "")
return formatted_program_info
# Test the function
markdown_content = """
### Context:
Master’s Degrees – Online and On Campus
### Instructions:
- Extract all program details (descriptions, requirements, admission criteria, tuition fees, research areas, etc.) in their entirety.
- Format the extracted text in markdown:
- Use ## for main sections and ### for subsections.
- Use - for unordered lists, indenting sublists with two spaces.
- Write in a formal, polished, and engaging tone suitable for publication in a journal or magazine.
- Remove:
- Calls-to-action (e.g., "Apply Now," "Contact Us").
- Contact details (emails, phone numbers, websites).
- Placeholder text (e.g., "Insert requirements here").
- Navigation elements or user instructions (e.g., "Click here").
- External links or references (e.g., "More details at [URL]").
- Ensure the output is self-contained, professional, and free of digital-specific language (e.g., "click here").
- If the input contains a 404 Error or is invalid, return only the string "NA" (without quotes or additional formatting).
### Constraints:
- The input context may be in **different languages**, but you must **always provide the output in English**.
- Do not summarize, omit, or alter program details.
- Do not include external links, calls-to-action, or contact information.
- Avoid digital-specific language or prompts for user interaction.
- Write in a formal, journal-ready tone that is engaging and polished.
- Return only the extracted program information in the specified markdown format.
- If the input is invalid (e.g., 404 Error), return only the string "NA" (without quotes or additional formatting).
"""
print(extract_program_info(markdown_content))```python
# No import statement needed
def extract_program_info(markdown_content):
"""
Extracts relevant information related to a university program from the provided markdown content.
Args:
markdown_content (str): The markdown content containing program information.
Returns:
str: The extracted program information in a structured markdown format, or "NA" if the input is invalid.
"""
# Check if the input contains a 404 Error or is invalid
if "404 Error" in markdown_content or not markdown_content:
return "NA"
# Extract program details (descriptions, requirements, admission criteria, tuition fees, research areas, etc.)
program_details = []
lines = markdown_content.splitlines()
for line in lines:
# Remove calls-to-action, contact details, placeholder text, and external references
if "Apply Now" not in line and "Contact Us" not in line and "Insert requirements here" not in line and "More details at" not in line:
program_details.append(line)
# Format the extracted text in markdown
formatted_program_info = ""
for line in program_details:
if line.startswith("###"):
formatted_program_info += "## " + line[4:] + "\n"
elif line.startswith("-"):
formatted_program_info += " " + line + "\n"
else:
formatted_program_info += line + "\n"
# Write in a formal, polished, and engaging tone suitable for publication in a journal or magazine
# Remove non-relevant content such as navigation elements or user instructions
formatted_program_info = formatted_program_info.replace("Click here", "").replace("Click Here", "")
return formatted_program_info
# Test the function
markdown_content = """
### Context:
Master’s Degrees – Online and On Campus
### Instructions:
- Extract all program details (descriptions, requirements, admission criteria, tuition fees, research areas, etc.) in their entirety.
- Format the extracted text in markdown:
- Use ## for main sections and ### for subsections.
- Use - for unordered lists, indenting sublists with two spaces.
- Write in a formal, polished, and engaging tone suitable for publication in a journal or magazine.
- Remove:
- Calls-to-action (e.g., "Apply Now," "Contact Us").
- Contact details (emails, phone numbers, websites).
- Placeholder text (e.g., "Insert requirements here").
- Navigation elements or user instructions (e.g., "Click here").
- External links or references (e.g., "More details at [URL]").
- Ensure the output is self-contained, professional, and free of digital-specific language (e.g., "click here").
- If the input contains a 404 Error or is invalid, return only the string "NA" (without quotes or additional formatting).
### Constraints:
- The input context may be in **different languages**, but you must **always provide the output in English**.
- Do not summarize, omit, or alter program details.
- Do not include external links, calls-to-action, or contact information.
- Avoid digital-specific language or prompts for user interaction.
- Write in a formal, journal-ready tone that is engaging and polished.
- Return only the extracted program information in the specified markdown format.
- If the input is invalid (e.g., 404 Error), return only the string "NA" (without quotes or additional formatting).
"""
print(extract_program_info(markdown_content))```python
# No import statement needed
def extract_program_info(markdown_content):
"""
Extracts relevant information related to a university program from the provided markdown content.
Args:
markdown_content (str): The markdown content containing program information.
Returns:
str: The extracted program information in a structured markdown format, or "NA" if the input is invalid.
"""
# Check if the input contains a 404 Error or is invalid
if "404 Error" in markdown_content or not markdown_content:
return "NA"
# Extract program details (descriptions, requirements, admission criteria, tuition fees, research areas, etc.)
program_details = []
lines = markdown_content.splitlines()
for line in lines:
# Remove calls-to-action, contact details, placeholder text, and external references
if "Apply Now" not in line and "Contact Us" not in line and "Insert requirements here" not in line and "More details at" not in line:
program_details.append(line)
# Format the extracted text in markdown
formatted_program_info = ""
for line in program_details:
if line.startswith("###"):
formatted_program_info += "## " + line[4:] + "\n"
elif line.startswith("-"):
formatted_program_info += " " + line + "\n"
else:
formatted_program_info += line + "\n"
# Write in a formal, polished, and engaging tone suitable for publication in a journal or magazine
# Remove non-relevant content such as navigation elements or user instructions
formatted_program_info = formatted_program_info.replace("Click here", "").replace("Click Here", "")
return formatted_program_info
# Test the function
markdown_content = """
### Context:
Master’s Degrees – Online and On Campus
### Instructions:
- Extract all program details (descriptions, requirements, admission criteria, tuition fees, research areas, etc.) in their entirety.
- Format the extracted text in markdown:
- Use ## for main sections and ### for subsections.
- Use - for unordered lists, indenting sublists with two spaces.
- Write in a formal, polished, and engaging tone suitable for publication in a journal or magazine.
- Remove:
- Calls-to-action (e.g., "Apply Now," "Contact Us").
- Contact details (emails, phone numbers, websites).
- Placeholder text (e.g., "Insert requirements here").
- Navigation elements or user instructions (e.g., "Click here").
- External links or references (e.g., "More details at [URL]").
- Ensure the output is self-contained, professional, and free of digital-specific language (e.g., "click here").
- If the input contains a 404 Error or is invalid, return only the string "NA" (without quotes or additional formatting).
### Constraints:
- The input context may be in **different languages**, but you must **always provide the output in English**.
- Do not summarize, omit, or alter program details.
- Do not include external links, calls-to-action, or contact information.
- Avoid digital-specific language or prompts for user interaction.
- Write in a formal, journal-ready tone that is engaging and polished.
- Return only the extracted program information in the specified markdown format.
- If the input is invalid (e.g., 404 Error), return only the string "NA" (without quotes or additional formatting).
"""
print(extract_program_info(markdown_content))```python
# No import statement needed
def extract_program_info(markdown_content):
"""
Extracts relevant information related to a university program from the provided markdown content.
Args:
markdown_content (str): The markdown content containing program information.
Returns:
str: The extracted program information in a structured markdown format, or "NA" if the input is invalid.
"""
# Check if the input contains a 404 Error or is invalid
if "404 Error" in markdown_content or not markdown_content:
return "NA"
# Extract program details (descriptions, requirements, admission criteria, tuition fees, research areas, etc.)
program_details = []
lines = markdown_content.splitlines()
for line in lines:
# Remove calls-to-action, contact details, placeholder text, and external references
if "Apply Now" not in line and "Contact Us" not in line and "Insert requirements here" not in line and "More details at" not in line:
program_details.append(line)
# Format the extracted text in markdown
formatted_program_info = ""
for line in program_details:
if line.startswith("###"):
formatted_program_info += "## " + line[4:] + "\n"
elif line.startswith("-"):
formatted_program_info += " " + line + "\n"
else:
formatted_program_info += line + "\n"
# Write in a formal, polished, and engaging tone suitable for publication in a journal or magazine
# Remove non-relevant content such as navigation elements or user instructions
formatted_program_info = formatted_program_info.replace("Click here", "").replace("Click Here", "")
return formatted_program_info
# Test the function
markdown_content = """
### Context:
Master’s Degrees – Online and On Campus
### Instructions:
- Extract all program details (descriptions, requirements, admission criteria, tuition fees, research areas, etc.) in their entirety.
- Format the extracted text in markdown:
- Use ## for main sections and ### for subsections.
- Use - for unordered lists, indenting sublists with two spaces.
- Write in a formal, polished, and engaging tone suitable for publication in a journal or magazine.
- Remove:
- Calls-to-action (e.g., "Apply Now," "Contact Us").
- Contact details (emails, phone numbers, websites).
- Placeholder text (e.g., "Insert requirements here").
- Navigation elements or user instructions (e.g., "Click here").
- External links or references (e.g., "More details at [URL]").
- Ensure the output is self-contained, professional, and free of digital-specific language (e.g., "click here").
- If the input contains a 404 Error or is invalid, return only the string "NA" (without quotes or additional formatting).
### Constraints:
- The input context may be in **different languages**, but you must **always provide the output in English**.
- Do not summarize, omit, or alter program details.
- Do not include external links, calls-to-action, or contact information.
- Avoid digital-specific language or prompts for user interaction.
- Write in a formal, journal-ready tone that is engaging and polished.
- Return only the extracted program information in the specified markdown format.
- If the input is invalid (e.g., 404 Error), return only the string "NA" (without quotes or additional formatting).
"""
print(extract_program_info(markdown_content))```python
# No import statement needed
def extract_program_info(markdown_content):
"""
Extracts relevant information related to a university program from the provided markdown content.
Args:
markdown_content (str): The markdown content containing program information.
Returns:
str: The extracted program information in a structured markdown format, or "NA" if the input is invalid.
"""
# Check if the input contains a 404 Error or is invalid
if "404 Error" in markdown_content or not markdown_content:
return "NA"
# Extract program details (descriptions, requirements, admission criteria, tuition fees, research areas, etc.)
program_details = []
lines = markdown_content.splitlines()
for line in lines:
# Remove calls-to-action, contact details, placeholder text, and external references
if "Apply Now" not in line and "Contact Us" not in line and "Insert requirements here" not in line and "More details at" not in line:
program_details.append(line)
# Format the extracted text in markdown
formatted_program_info = ""
for line in program_details:
if line.startswith("###"):
formatted_program_info += "## " + line[4:] + "\n"
elif line.startswith("-"):
formatted_program_info += " " + line + "\n"
else:
formatted_program_info += line + "\n"
# Write in a formal, polished, and engaging tone suitable for publication in a journal or magazine
# Remove non-relevant content such as navigation elements or user instructions
formatted_program_info = formatted_program_info.replace("Click here", "").replace("Click Here", "")
return formatted_program_info
# Test the function
markdown_content = """
### Context:
Master’s Degrees – Online and On Campus
### Instructions:
- Extract all program details (descriptions, requirements, admission criteria, tuition fees, research areas, etc.) in their entirety.
- Format the extracted text in markdown:
- Use ## for main sections and ### for subsections.
- Use - for unordered lists, indenting sublists with two spaces.
- Write in a formal, polished, and engaging tone suitable for publication in a journal or magazine.
- Remove:
- Calls-to-action (e.g., "Apply Now," "Contact Us").
- Contact details (emails, phone numbers, websites).
- Placeholder text (e.g., "Insert requirements here").
- Navigation elements or user instructions (e.g., "Click here").
- External links or references (e.g., "More details at [URL]").
- Ensure the output is self-contained, professional, and free of digital-specific language (e.g., "click here").
- If the input contains a 404 Error or is invalid, return only the string "NA" (without quotes or additional formatting).
### Constraints:
- The input context may be in **different languages**, but you must **always provide the output in English**.
- Do not summarize, omit, or alter program details.
- Do not include external links, calls-to-action, or contact information.
- Avoid digital-specific language or prompts for user interaction.
- Write in a formal, journal-ready tone that is engaging and polished.
- Return only the extracted program information in the specified markdown format.
- If the input is invalid (e.g., 404 Error), return only the string "NA" (without quotes or additional formatting).
"""
print(extract_program_info(markdown_content))```python
# No import statement needed
def extract_program_info(markdown_content):
"""
Extracts relevant information related to a university program from the provided markdown content.
Args:
markdown_content (str): The markdown content containing program information.
Returns:
str: The extracted program information in a structured markdown format, or "NA" if the input is invalid.
"""
# Check if the input contains a 404 Error or is invalid
if "404 Error" in markdown_content or not markdown_content:
return "NA"
# Extract program details (descriptions, requirements, admission criteria, tuition fees, research areas, etc.)
program_details = []
lines = markdown_content.splitlines()
for line in lines:
# Remove calls-to-action, contact details, placeholder text, and external references
if "Apply Now" not in line and "Contact Us" not in line and "Insert requirements here" not in line and "More details at" not in line:
program_details.append(line)
# Format the extracted text in markdown
formatted_program_info = ""
for line in program_details:
if line.startswith("###"):
formatted_program_info += "## " + line[4:] + "\n"
elif line.startswith("-"):
formatted_program_info += " " + line + "\n"
else:
formatted_program_info += line + "\n"
# Write in a formal, polished, and engaging tone suitable for publication in a journal or magazine
# Remove non-relevant content such as navigation elements or user instructions
formatted_program_info = formatted_program_info.replace("Click here", "").replace("Click Here", "")
return formatted_program_info
# Test the function
markdown_content = """
### Context:
Master’s Degrees – Online and On Campus
### Instructions:
- Extract all program details (descriptions, requirements, admission criteria, tuition fees, research areas, etc.) in their entirety.
- Format the extracted text in markdown:
- Use ## for main sections and ### for subsections.
- Use - for unordered lists, indenting sublists with two spaces.
- Write in a formal, polished, and engaging tone suitable for publication in a journal or magazine.
- Remove:
- Calls-to-action (e.g., "Apply Now," "Contact Us").
- Contact details (emails, phone numbers, websites).
- Placeholder text (e.g., "Insert requirements here").
- Navigation elements or user instructions (e.g., "Click here").
- External links or references (e.g., "More details at [URL]").
- Ensure the output is self-contained, professional, and free of digital-specific language (e.g., "click here").
- If the input contains a 404 Error or is invalid, return only the string "NA" (without quotes or additional formatting).
### Constraints:
- The input context may be in **different languages**, but you must **always provide the output in English**.
- Do not summarize, omit, or alter program details.
- Do not include external links, calls-to-action, or contact information.
- Avoid digital-specific language or prompts for user interaction.
- Write in a formal, journal-ready tone that is engaging and polished.
- Return only the extracted program information in the specified markdown format.
- If the input is invalid (e.g., 404 Error), return only the string "NA" (without quotes or additional formatting).
"""
print(extract_program_info(markdown_content))```python
# No import statement needed
def extract_program_info(markdown_content):
"""
Extracts relevant information related to a university program from the provided markdown content.
Args:
markdown_content (str): The markdown content containing program information.
Returns:
str: The extracted program information in a structured markdown format, or "NA" if the input is invalid.
"""
# Check if the input contains a 404 Error or is invalid
if "404 Error" in markdown_content or not markdown_content:
return "NA"
# Extract program details (descriptions, requirements, admission criteria, tuition fees, research areas, etc.)
program_details = []
lines = markdown_content.splitlines()
for line in lines:
# Remove calls-to-action, contact details, placeholder text, and external references
if "Apply Now" not in line and "Contact Us" not in line and "Insert requirements here" not in line and "More details at" not in line:
program_details.append(line)
# Format the extracted text in markdown
formatted_program_info = ""
for line in program_details:
if line.startswith("###"):
formatted_program_info += "## " + line[4:] + "\n"
elif line.startswith("-"):
formatted_program_info += " " + line + "\n"
else:
formatted_program_info += line + "\n"
# Write in a formal, polished, and engaging tone suitable for publication in a journal or magazine
# Remove non-relevant content such as navigation elements or user instructions
formatted_program_info = formatted_program_info.replace("Click here", "").replace("Click Here", "")
return formatted_program_info
# Test the function
markdown_content = """
### Context:
Master’s Degrees – Online and On Campus
### Instructions:
- Extract all program details (descriptions, requirements, admission criteria, tuition fees, research areas, etc.) in their entirety.
- Format the extracted text in markdown:
- Use ## for main sections and ### for subsections.
- Use - for unordered lists, indenting sublists with two spaces.
- Write in a formal, polished, and engaging tone suitable for publication in a journal or magazine.
- Remove:
- Calls-to-action (e.g., "Apply Now," "Contact Us").
- Contact details (emails, phone numbers, websites).
- Placeholder text (e.g., "Insert requirements here").
- Navigation elements or user instructions (e.g., "Click here").
- External links or references (e.g., "More details at [URL]").
- Ensure the output is self-contained, professional, and free of digital-specific language (e.g., "click here").
- If the input contains a 404 Error or is invalid, return only the string "NA" (without quotes or additional formatting).
### Constraints:
- The input context may be in **different languages**, but you must **always provide the output in English**.
- Do not summarize, omit, or alter program details.
- Do not include external links, calls-to-action, or contact information.
- Avoid digital-specific language or prompts for user interaction.
- Write in a formal, journal-ready tone that is engaging and polished.
- Return only the extracted program information in the specified markdown format.
- If the input is invalid (e.g., 404 Error), return only the string "NA" (without quotes or additional formatting).
"""
print(extract_program_info(markdown_content))```python
# No import statement needed
def extract_program_info(markdown_content):
"""
Extracts relevant information related to a university program from the provided markdown content.
Args:
markdown_content (str): The markdown content containing program information.
Returns:
str: The extracted program information in a structured markdown format, or "NA" if the input is invalid.
"""
# Check if the input contains a 404 Error or is invalid
if "404 Error" in markdown_content or not markdown_content:
return "NA"
# Extract program details (descriptions, requirements, admission criteria, tuition fees, research areas, etc.)
program_details = []
lines = markdown_content.splitlines()
for line in lines:
# Remove calls-to-action, contact details, placeholder text, and external references
if "Apply Now" not in line and "Contact Us" not in line and "Insert requirements here" not in line and "More details at" not in line:
program_details.append(line)
# Format the extracted text in markdown
formatted_program_info = ""
for line in program_details:
if line.startswith("###"):
formatted_program_info += "## " + line[4:] + "\n"
elif line.startswith("-"):
formatted_program_info += " " + line + "\n"
else:
formatted_program_info += line + "\n"
# Write in a formal, polished, and engaging tone suitable for publication in a journal or magazine
# Remove non-relevant content such as navigation elements or user instructions
formatted_program_info = formatted_program_info.replace("Click here", "").replace("Click Here", "")
return formatted_program_info
# Test the function
markdown_content = """
### Context:
Master’s Degrees – Online and On Campus
### Instructions:
- Extract all program details (descriptions, requirements, admission criteria, tuition fees, research areas, etc.) in their entirety.
- Format the extracted text in markdown:
- Use ## for main sections and ### for subsections.
- Use - for unordered lists, indenting sublists with two spaces.
- Write in a formal, polished, and engaging tone suitable for publication in a journal or magazine.
- Remove:
- Calls-to-action (e.g., "Apply Now," "Contact Us").
- Contact details (emails, phone numbers, websites).
- Placeholder text (e.g., "Insert requirements here").
- Navigation elements or user instructions (e.g., "Click here").
- External links or references (e.g., "More details at [URL]").
- Ensure the output is self-contained, professional, and free of digital-specific language (e.g., "click here").
- If the input contains a 404 Error or is invalid, return only the string "NA" (without quotes or additional formatting).
### Constraints:
- The input context may be in **different languages**, but you must **always provide the output in English**.
- Do not summarize, omit, or alter program details.
- Do not include external links, calls-to-action, or contact information.
- Avoid digital-specific language or prompts for user interaction.
- Write in a formal, journal-ready tone that is engaging and polished.
- Return only the extracted program information in the specified markdown format.
- If the input is invalid (e.g., 404 Error), return only the string "NA" (without quotes or additional formatting).
"""
print(extract_program_info(markdown_content))```python
# No import statement needed
def extract_program_info(markdown_content):
"""
Extracts relevant information related to a university program from the provided markdown content.
Args:
markdown_content (str): The markdown content containing program information.
Returns:
str: The extracted program information in a structured markdown format, or "NA" if the input is invalid.
"""
# Check if the input contains a 404 Error or is invalid
if "404 Error" in markdown_content or not markdown_content:
return "NA"
# Extract program details (descriptions, requirements, admission criteria, tuition fees, research areas, etc.)
program_details = []
lines = markdown_content.splitlines()
for line in lines:
# Remove calls-to-action, contact details, placeholder text, and external references
if "Apply Now" not in line and "Contact Us" not in line and "Insert requirements here" not in line and "More details at" not in line:
program_details.append(line)
# Format the extracted text in markdown
formatted_program_info = ""
for line in program_details:
if line.startswith("###"):
formatted_program_info += "## " + line[4:] + "\n"
elif line.startswith("-"):
formatted_program_info += " " + line + "\n"
else:
formatted_program_info += line + "\n"
# Write in a formal, polished, and engaging tone suitable for publication in a journal or magazine
# Remove non-relevant content such as navigation elements or user instructions
formatted_program_info = formatted_program_info.replace("Click here", "").replace("Click Here", "")
return formatted_program_info
# Test the function
markdown_content = """
### Context:
Master’s Degrees – Online and On Campus
### Instructions:
- Extract all program details (descriptions, requirements, admission criteria, tuition fees, research areas, etc.) in their entirety.
- Format the extracted text in markdown:
- Use ## for main sections and ### for subsections.
- Use - for unordered lists, indenting sublists with two spaces.
- Write in a formal, polished, and engaging tone suitable for publication in a journal or magazine.
- Remove:
- Calls-to-action (e.g., "Apply Now," "Contact Us").
- Contact details (emails, phone numbers, websites).
- Placeholder text
See More
