| | --- |
| | license: apache-2.0 |
| | task_categories: |
| | - question-answering |
| | - text-classification |
| | language: |
| | - en |
| | tags: |
| | - agent |
| | --- |
| | |
| | # BYU-Idaho Web Content Dataset (NLP-Enhanced) |
| |
|
| | **State-of-the-art** university web content dataset with full NLP enrichment: entity extraction, acronym detection, domain terminology, and semantic features. Enterprise-ready for advanced RAG, semantic search, and AI applications. |
| |
|
| | ## Dataset Description |
| |
|
| | **Records:** 2,448 ultra-high-quality pages |
| | **Source:** byui.edu and subdomains |
| | **Format:** Markdown + NLP metadata (JSON fields) |
| | **Quality:** 40.2% filtered + 91.5/100 avg score + Full NLP extraction |
| | **Last Updated:** December 2025 |
| |
|
| | ### NLP Enrichment Features |
| |
|
| | **Entity Extraction** (spaCy NER) |
| | - **15,289 organizations** extracted |
| | - **3,029 locations** extracted |
| | - **4,841 people** extracted |
| | - **94.2% page coverage** |
| |
|
| | **Acronym Detection** |
| | - **4,036 acronyms** detected and expanded |
| | - **81.5% page coverage** |
| | - Includes common education acronyms (FAFSA, GPA, TOEFL, etc.) |
| |
|
| | **Domain Terminology** |
| | - **566 BYU-Idaho specific terms** found |
| | - **16.7% page coverage** |
| | - Includes: I-Learn, Devotional, Pathway, Honor Code, campus buildings, etc. |
| |
|
| | **Key Phrases** |
| | - **187 action phrases** extracted |
| | - Common educational actions: "apply for admission", "register for classes", etc. |
| |
|
| | **Domain N-grams** |
| | - Common domain-specific 3-word phrases |
| | - Frequency-filtered for relevance |
| |
|
| | ## Dataset Structure |
| |
|
| | ### Core Fields |
| |
|
| | - **index** (`int64`): Sequential ID (1-2448) |
| | - **url** (`string`): Source URL |
| | - **title** (`string`): Page title |
| | - **topic** (`string`): Main heading (H1) |
| | - **meta_description** (`string`): SEO description |
| | - **content** (`string`): Full Markdown content (avg 2,230 chars) |
| | - **category** (`string`): 14 categories (Academics, Admissions, etc.) |
| | - **content_type** (`string`): 7 types (informational, guide, FAQ, etc.) |
| | - **quality_score** (`int64`): Quality 0-100 (avg: 91.5) |
| | - **reading_level** (`float64`): Flesch-Kincaid grade level (avg: 14.4) |
| |
|
| | ### NLP Fields |
| |
|
| | **entities** (`string` - JSON): |
| | ```json |
| | { |
| | "organizations": ["BYU-Idaho", "Financial Aid Office", "College of Business"], |
| | "locations": ["Rexburg", "Idaho", "Manwaring Center"], |
| | "programs": ["Computer Science", "Nursing"], |
| | "people": ["David A. Bednar", "Gordon B. Hinckley"] |
| | } |
| | ``` |
| |
|
| | **byui_terms** (`string` - JSON): |
| | ```json |
| | ["Devotional", "I-Learn", "Pathway", "Honor Code", "Manwaring Center"] |
| | ``` |
| | |
| | **acronyms** (`string` - JSON): |
| | ```json |
| | { |
| | "FAFSA": "Free Application for Federal Student Aid", |
| | "GPA": "Grade Point Average", |
| | "TOEFL": "Test of English as a Foreign Language" |
| | } |
| | ``` |
| | |
| | **key_phrases** (`string` - JSON): |
| | ```json |
| | [ |
| | "apply for admission", |
| | "register for classes", |
| | "submit transcripts", |
| | "complete the FAFSA" |
| | ] |
| | ``` |
| |
|
| | **domain_ngrams** (`string` - JSON): |
| | ```json |
| | [ |
| | "church of jesus christ", |
| | "brigham young university", |
| | "learn more about" |
| | ] |
| | ``` |
| | |
| | ## Usage |
| | |
| | ### Basic Loading |
| | |
| | ```python |
| | from datasets import load_dataset |
| | import json |
| | |
| | ds = load_dataset("BYU-Idaho/Web-Content")['train'] |
| | |
| | # Parse JSON fields |
| | row = ds[0] |
| | entities = json.loads(row['entities']) |
| | acronyms = json.loads(row['acronyms']) |
| | byui_terms = json.loads(row['byui_terms']) |
| | |
| | print(f"Organizations: {entities['organizations']}") |
| | print(f"Acronyms: {list(acronyms.keys())}") |
| | ``` |
| | |
| | ### Entity-Based Filtering |
| | |
| | ```python |
| | import json |
| | |
| | # Find pages mentioning specific organizations |
| | def has_organization(row, org_name): |
| | entities = json.loads(row['entities']) |
| | return org_name in entities['organizations'] |
| | |
| | financial_aid_pages = ds.filter( |
| | lambda x: has_organization(x, 'Financial Aid Office') |
| | ) |
| | ``` |
| | |
| | ### Acronym Expansion for RAG |
| | |
| | ```python |
| | # Build acronym lookup table |
| | all_acronyms = {} |
| | for row in ds: |
| | acronyms = json.loads(row['acronyms']) |
| | all_acronyms.update(acronyms) |
| | |
| | # Use in RAG to expand user queries |
| | def expand_acronyms(query): |
| | for acronym, expansion in all_acronyms.items(): |
| | if acronym in query: |
| | query += f" {expansion}" |
| | return query |
| | |
| | # "What is FAFSA?" → "What is FAFSA Free Application for Federal Student Aid?" |
| | ``` |
| | |
| | ### BYU-Idaho Term Filtering |
| | |
| | ```python |
| | # Find pages about specific campus features |
| | def has_byui_term(row, term): |
| | terms = json.loads(row['byui_terms']) |
| | return term in terms |
| | |
| | devotional_pages = ds.filter(lambda x: has_byui_term(x, 'Devotional')) |
| | pathway_pages = ds.filter(lambda x: has_byui_term(x, 'Pathway')) |
| | ``` |
| | |
| | ### Location-Based Search |
| | |
| | ```python |
| | # Find pages about specific locations |
| | def mentions_location(row, location): |
| | entities = json.loads(row['entities']) |
| | return location in entities['locations'] |
| | |
| | rexburg_pages = ds.filter(lambda x: mentions_location(x, 'Rexburg')) |
| | ``` |
| | |
| | ### Advanced: Build Entity Index |
| | |
| | ```python |
| | from collections import defaultdict |
| | import json |
| | |
| | # Build inverted index: entity → list of page indices |
| | entity_index = defaultdict(list) |
| | |
| | for idx, row in enumerate(ds): |
| | entities = json.loads(row['entities']) |
| | for org in entities['organizations']: |
| | entity_index[org].append(idx) |
| | for loc in entities['locations']: |
| | entity_index[loc].append(idx) |
| | |
| | # Quick lookup: all pages mentioning "Tutoring Center" |
| | tutoring_pages = [ds[i] for i in entity_index['Tutoring Center']] |
| | ``` |
| | |
| | ## NLP Enrichment Statistics |
| | |
| | | Feature | Total Extracted | Page Coverage | |
| | |---------|----------------|---------------| |
| | | **Organizations** | 15,289 | 94.2% | |
| | | **Locations** | 3,029 | 94.2% | |
| | | **People** | 4,841 | 94.2% | |
| | | **Acronyms** | 4,036 | 81.5% | |
| | | **BYU-Idaho Terms** | 566 | 16.7% | |
| | | **Key Phrases** | 187 | - | |
| |
|
| | ## Top Entities Extracted |
| |
|
| | **Organizations** (most common): |
| | - BYU-Idaho |
| | - Brigham Young University-Idaho |
| | - Ricks College |
| | - Financial Aid Office |
| | - Accessibility Services Office |
| | - Academic Leadership Office |
| | - Church of Jesus Christ of Latter-day Saints |
| |
|
| | **Locations** (most common): |
| | - Rexburg |
| | - Idaho |
| | - Manwaring Center |
| | - BYU-Idaho Center |
| | - Taylor Chapel |
| | - United States |
| |
|
| | **BYU-Idaho Terms**: |
| | - Devotional |
| | - Forum |
| | - Pathway |
| | - Honor Code |
| | - I-Learn |
| | - PathwayConnect |
| | - Track System |
| | - Manwaring Center |
| | - Tutoring Center |
| | - Writing Center |
| |
|
| | **Common Acronyms**: |
| | - GPA, TOEFL, SAT, ACT, AP |
| | - FAFSA, FERPA, CLEP |
| | - NCAA, ESL, IELTS |
| |
|
| | ## Use Cases |
| |
|
| | ### Entity-Aware RAG |
| | ```python |
| | # Route queries based on entities mentioned |
| | if "Financial Aid" in query_entities: |
| | context = filter_to_financial_aid_entities() |
| | ``` |
| |
|
| | ### Acronym-Expanded Search |
| | ```python |
| | # Automatically expand acronyms in search |
| | query = expand_all_acronyms(user_query) |
| | results = semantic_search(query) |
| | ``` |
| |
|
| | ### Faceted Navigation |
| | ```python |
| | # Filter by entity types |
| | filters = { |
| | 'organization': 'College of Business', |
| | 'location': 'Manwaring Center', |
| | 'term': 'Devotional' |
| | } |
| | ``` |
| |
|
| | ### Smart Query Routing |
| | ```python |
| | # Detect BYU-Idaho terms and route to specialized retrievers |
| | if any(term in query for term in byui_terms): |
| | use_institutional_knowledge_retriever() |
| | ``` |
| |
|
| | ### Relationship Extraction |
| | ```python |
| | # Find connections between entities |
| | # "Which offices are in Manwaring Center?" |
| | pages_with_both = find_pages_with_entities(['Manwaring Center'], ['organizations']) |
| | ``` |
| |
|
| | ## Technical Details |
| |
|
| | **NLP Pipeline:** |
| | 1. spaCy en_core_web_sm for NER |
| | 2. Pattern matching for acronyms |
| | 3. Custom BYU-Idaho term dictionary |
| | 4. Regex for action phrase extraction |
| | 5. N-gram frequency analysis |
| | |
| | **Entity Types:** |
| | - Organizations: spaCy ORG label |
| | - Locations: spaCy GPE label |
| | - People: spaCy PERSON label (filtered) |
| | - Programs: Heuristic-based extraction |
| | |
| | **Acronym Detection:** |
| | - Known education acronyms (pre-defined) |
| | - Pattern: `ACRONYM (expansion)` |
| | - Pattern: `expansion (ACRONYM)` |
| | |
| | ## Citation |
| | |
| | ```bibtex |
| | @misc{byui-web-content-nlp-2025, |
| | title={BYU-Idaho Web Content Dataset (NLP-Enhanced)}, |
| | author={Ron Vallejo}, |
| | year={2025}, |
| | version={4.0.0}, |
| | publisher={Brigham Young University-Idaho}, |
| | howpublished={\url{https://huggingface.co/datasets/BYU-Idaho/Web-Content}} |
| | } |
| | ``` |