From 7d63b766261a81c5b6241a176da1cd58e5870878 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o?= Date: Wed, 18 Jun 2025 11:57:53 +0200 Subject: [PATCH 01/14] create pressbook collector --- .../collectors/press_books_coolector.py | 98 +++++++++++++++++++ .../URLCollectors/node_press_books_collect.py | 52 ++++++++++ 2 files changed, 150 insertions(+) create mode 100644 welearn_datastack/collectors/press_books_coolector.py create mode 100644 welearn_datastack/nodes_workflow/URLCollectors/node_press_books_collect.py diff --git a/welearn_datastack/collectors/press_books_coolector.py b/welearn_datastack/collectors/press_books_coolector.py new file mode 100644 index 0000000..484885a --- /dev/null +++ b/welearn_datastack/collectors/press_books_coolector.py @@ -0,0 +1,98 @@ +import logging +from typing import List +from urllib.parse import urlparse, urlunparse + +import requests +from requests import Response + +from welearn_datastack.constants import HEADERS +from welearn_datastack.data.db_models import Corpus, WeLearnDocument +from welearn_datastack.data.url_collector import URLCollector +from welearn_datastack.exceptions import NotEnoughData +from welearn_datastack.utils_.http_client_utils import get_new_https_session + +logger = logging.getLogger(__name__) + + +class PressBooksURLCollector(URLCollector): + def __init__( + self, corpus: Corpus | None, api_key: str, application_id: str, qty_books: int + ) -> None: + self.corpus = corpus + self.algolia_base_url = "https://k0sncqlm4a-dsn.algolia.net" + self.api_key = api_key + self.application_id = application_id + self.qty_books = qty_books + + def collect(self) -> List[WeLearnDocument]: + """ + Collect the URLs of the books and their chapters. + :return: + """ + # Get last books + logger.info("Getting last book from pressbooks...") + client = get_new_https_session() + forged_url = f"{self.algolia_base_url}/1/indexes/prod_pressbooks_directory_by_lastUpdated/browse" + params = { + "x-algolia-api-key": self.api_key, + "x-algolia-application-id": self.application_id, + } + body = {"hitsPerPage": self.qty_books, "attributesToRetrieve": ["url"]} + resp_last_books: Response = client.post( + url=forged_url, params=params, json=body + ) + resp_last_books.raise_for_status() + hits = resp_last_books.json().get("hits") + if not hits: + raise NotEnoughData("There is no data from pressbooks") + + logger.info(f"Got {len(hits)} main books from pressbooks") + + main_books_url = [hit.get("url") for hit in hits] + tocs_url = [f"{hit}wp-json/pressbooks/v2/toc" for hit in main_books_url] + logger.info("Getting TOCs...") + tocs: list[dict] = [] + for toc_url in tocs_url: + resp_toc = client.get(toc_url, headers=HEADERS) + try: + resp_toc.raise_for_status() + except requests.exceptions.RequestException as req_e: + logger.warning(f"Exception while getting {toc_url}: {str(req_e)}") + continue + tocs.append(resp_toc.json()) + logger.info(f"Got {len(tocs)} tocs from pressbooks") + logger.info("Extracting real URL from tocs...") + + preformated_page_urls = [] + for toc in tocs: + links = toc.get("_links") + if not links: + logger.warning("Empty TOC, continue") + continue + metadata = links.get("metadata") + if not links: + logger.warning("Empty TOC, continue") + continue + local_urls: list[str] = [i.get("href") for i in metadata] + preformated_page_urls.extend(local_urls) + + page_urls = set() + for url in preformated_page_urls: + preformat = url.replace("/metadata", "") + parsed = urlparse(preformat) + post_id = parsed.path.split("/")[-1] + book_domain = parsed.path.split("/")[ + 1 + ] # 1st one is empty bc path start with '/' + # scheme='scheme', netloc='netloc', path='/path;parameters', params='', query='query', fragment='fragment' + final_url = urlunparse( + ["https", parsed.netloc, book_domain + "/", "", f"p={post_id}", ""] + ) + page_urls.add(final_url) + logger.info(f"There is {len(page_urls)} found in this pressbooks batch") + ret: list[WeLearnDocument] = [] + for page_url in page_urls: + local_doc = WeLearnDocument(url=page_url, corpus_id=self.corpus.id) + ret.append(local_doc) + + return ret diff --git a/welearn_datastack/nodes_workflow/URLCollectors/node_press_books_collect.py b/welearn_datastack/nodes_workflow/URLCollectors/node_press_books_collect.py new file mode 100644 index 0000000..4855724 --- /dev/null +++ b/welearn_datastack/nodes_workflow/URLCollectors/node_press_books_collect.py @@ -0,0 +1,52 @@ +import logging +import os +from uuid import uuid4 + +from welearn_datastack.collectors.press_books_coolector import PressBooksURLCollector +from welearn_datastack.data.db_models import Corpus +from welearn_datastack.nodes_workflow.URLCollectors.nodes_helpers.collect import ( + insert_urls, +) +from welearn_datastack.utils_.database_utils import create_db_session +from welearn_datastack.utils_.virtual_environement_utils import load_dotenv_local + +log_level: int = logging.getLevelName(os.getenv("LOG_LEVEL", "INFO")) +log_format: str = os.getenv( + "LOG_FORMAT", "[%(asctime)s][%(name)s][%(levelname)s] - %(message)s" +) + +if not isinstance(log_level, int): + raise ValueError("Log level is not recognized : '%s'", log_level) + +logging.basicConfig( + level=logging.getLevelName(log_level), + format=log_format, +) +logger = logging.getLogger(__name__) + + +if __name__ == "__main__": + logger.info("Press Books collector starting...") + load_dotenv_local() + session = create_db_session() + api_key = os.getenv("PRESSBOOKS_ALGOLIA_API_KEY") + app_id = os.getenv("PRESSBOOKS_ALGOLIA_APPLICATION_ID") + qty_books = 20 + + corpus: Corpus | None = ( + session.query(Corpus).filter_by(source_name="conversation").one_or_none() + ) + + pb_collector = PressBooksURLCollector( + corpus=corpus, api_key=api_key, application_id=app_id, qty_books=qty_books + ) + + urls = pb_collector.collect() + + logger.info("URLs retrieved : '%s'", len(urls)) + insert_urls( + session=session, + urls=urls, + ) + + logger.info("Press Books collector ended") From 864f4c2d2bae7bc9801ec7ae4bcf139ce1275029 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o?= Date: Wed, 18 Jun 2025 14:35:53 +0200 Subject: [PATCH 02/14] rename --- .../{press_books_coolector.py => press_books_collector.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename welearn_datastack/collectors/{press_books_coolector.py => press_books_collector.py} (100%) diff --git a/welearn_datastack/collectors/press_books_coolector.py b/welearn_datastack/collectors/press_books_collector.py similarity index 100% rename from welearn_datastack/collectors/press_books_coolector.py rename to welearn_datastack/collectors/press_books_collector.py From e9346f2d025dd50c1a5f798ee9b8c5f4b4b2784d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o?= Date: Wed, 18 Jun 2025 15:15:29 +0200 Subject: [PATCH 03/14] url collector + test --- .../resources/pb_algolia_response.json | 22 + tests/url_collector/resources/pb_toc1.json | 2031 +++++++++++++++++ tests/url_collector/resources/pb_toc2.json | 1971 ++++++++++++++++ .../test_press_books_collector.py | 64 + .../collectors/press_books_collector.py | 6 +- 5 files changed, 4093 insertions(+), 1 deletion(-) create mode 100644 tests/url_collector/resources/pb_algolia_response.json create mode 100644 tests/url_collector/resources/pb_toc1.json create mode 100644 tests/url_collector/resources/pb_toc2.json create mode 100644 tests/url_collector/test_press_books_collector.py diff --git a/tests/url_collector/resources/pb_algolia_response.json b/tests/url_collector/resources/pb_algolia_response.json new file mode 100644 index 0000000..7219f87 --- /dev/null +++ b/tests/url_collector/resources/pb_algolia_response.json @@ -0,0 +1,22 @@ +{ + "hits": [ + { + "url": "https://iu.pressbooks.pub/resourceconveniencestore", + "datePublished": "2024-05-13", + "objectID": "9-84" + }, + { + "url": "https://ecampusontario.pressbooks.pub/2023prehealth/", + "datePublished": "2023-06-14", + "objectID": "18-3406" + } + ], + "nbHits": 8205, + "page": 0, + "nbPages": 4103, + "hitsPerPage": 2, + "processingTimeMS": 1, + "query": "", + "params": "hitsPerPage=2&attributesToRetrieve=%5B%22datePublished%22%2C%22url%22%5D", + "cursor": "AkhoaXRzUGVyUGFnZT0yJmF0dHJpYnV0ZXNUb1JldHJpZXZlPSU1QiUyMmRhdGVQdWJsaXNoZWQlMjIlMkMlMjJ1cmwlMjIlNUQBAQcxOC0zNDA2" +} \ No newline at end of file diff --git a/tests/url_collector/resources/pb_toc1.json b/tests/url_collector/resources/pb_toc1.json new file mode 100644 index 0000000..5489531 --- /dev/null +++ b/tests/url_collector/resources/pb_toc1.json @@ -0,0 +1,2031 @@ +{ + "front-matter": [ + { + "id": 193, + "title": "Introduction: Resource Convenience Store", + "slug": "introduction", + "author": 16426, + "comment_count": 0, + "menu_order": 1, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 624, + "link": "https://iu.pressbooks.pub/resourceconveniencestore/front-matter/introduction/", + "front-matter-type": [], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "Introduction: Resource Convenience Store", + "alternateName": "Introduction", + "alternativeHeadline": "Resource Convenience Store", + "showTitle": "on", + "inLanguage": "en", + "isPartOf": "Resources for Teaching: Inspiration and Sources from IUPUI and Beyond", + "editor": [ + { + "contributor_first_name": "Anna", + "contributor_last_name": "Comer", + "name": "Anna Comer", + "slug": "anncomer", + "@type": "Person" + } + ], + "author": [ + { + "contributor_first_name": "Rachel", + "contributor_last_name": "Wheeler", + "name": "Rachel Wheeler", + "slug": "wheelerr", + "@type": "Person" + } + ], + "contributor": [], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/publicdomain/zero/1.0/", + "name": "CC0 (Creative Commons Zero)" + } + } + } + ], + "parts": [ + { + "id": 37, + "title": "Gas: Tech How-To's", + "slug": "gas-tech-how-tos", + "author": 19729, + "comment_count": 0, + "menu_order": 1, + "status": "publish", + "export": true, + "has_post_content": false, + "word_count": 0, + "chapters": [ + { + "id": 109, + "title": "Canvas Commons: Shared Canvas Resources from IU and Beyond (IUPUI)", + "slug": "canvas-commons-iupui", + "author": 19729, + "comment_count": 0, + "menu_order": 1, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 115, + "link": "https://iu.pressbooks.pub/resourceconveniencestore/chapter/canvas-commons-iupui/", + "chapter-type": [], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "Canvas Commons: Shared Canvas Resources from IU and Beyond (IUPUI)", + "showTitle": "on", + "inLanguage": "en", + "isPartOf": "Resources for Teaching: Inspiration and Sources from IUPUI and Beyond", + "position": 1, + "editor": [ + { + "contributor_first_name": "Anna", + "contributor_last_name": "Comer", + "name": "Anna Comer", + "slug": "anncomer", + "@type": "Person" + } + ], + "author": [ + { + "contributor_first_name": "Rachel", + "contributor_last_name": "Wheeler", + "name": "Rachel Wheeler", + "slug": "wheelerr", + "@type": "Person" + } + ], + "contributor": [], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/publicdomain/zero/1.0/", + "name": "CC0 (Creative Commons Zero)" + } + } + }, + { + "id": 101, + "title": "Canvas Studio: Design Elements (IUPUI)", + "slug": "canvas-studio-iupui", + "author": 19729, + "comment_count": 0, + "menu_order": 2, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 122, + "link": "https://iu.pressbooks.pub/resourceconveniencestore/chapter/canvas-studio-iupui/", + "chapter-type": [], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "Canvas Studio: Design Elements (IUPUI)", + "showTitle": "on", + "inLanguage": "en", + "isPartOf": "Resources for Teaching: Inspiration and Sources from IUPUI and Beyond", + "position": 2, + "editor": [ + { + "contributor_first_name": "Anna", + "contributor_last_name": "Comer", + "name": "Anna Comer", + "slug": "anncomer", + "@type": "Person" + } + ], + "author": [ + { + "contributor_first_name": "Rachel", + "contributor_last_name": "Wheeler", + "name": "Rachel Wheeler", + "slug": "wheelerr", + "@type": "Person" + } + ], + "contributor": [], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/publicdomain/zero/1.0/", + "name": "CC0 (Creative Commons Zero)" + } + } + }, + { + "id": 120, + "title": "Course Test Drive: Preview Online Courses (IUPUI)", + "slug": "course-test-drive-iupui", + "author": 19729, + "comment_count": 0, + "menu_order": 3, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 86, + "link": "https://iu.pressbooks.pub/resourceconveniencestore/chapter/course-test-drive-iupui/", + "chapter-type": [], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "Course Test Drive: Preview Online Courses (IUPUI)", + "showTitle": "on", + "inLanguage": "en", + "isPartOf": "Resources for Teaching: Inspiration and Sources from IUPUI and Beyond", + "position": 3, + "editor": [ + { + "contributor_first_name": "Anna", + "contributor_last_name": "Comer", + "name": "Anna Comer", + "slug": "anncomer", + "@type": "Person" + } + ], + "author": [ + { + "contributor_first_name": "Rachel", + "contributor_last_name": "Wheeler", + "name": "Rachel Wheeler", + "slug": "wheelerr", + "@type": "Person" + } + ], + "contributor": [], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/publicdomain/zero/1.0/", + "name": "CC0 (Creative Commons Zero)" + } + } + }, + { + "id": 111, + "title": "Google at IU: How to Use Google Drive for Your Course (IUPUI)", + "slug": "google-at-iu-iupui", + "author": 19729, + "comment_count": 0, + "menu_order": 4, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 59, + "link": "https://iu.pressbooks.pub/resourceconveniencestore/chapter/google-at-iu-iupui/", + "chapter-type": [], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "Google at IU: How to Use Google Drive for Your Course (IUPUI)", + "showTitle": "on", + "inLanguage": "en", + "isPartOf": "Resources for Teaching: Inspiration and Sources from IUPUI and Beyond", + "position": 4, + "editor": [ + { + "contributor_first_name": "Anna", + "contributor_last_name": "Comer", + "name": "Anna Comer", + "slug": "anncomer", + "@type": "Person" + } + ], + "author": [ + { + "contributor_first_name": "Rachel", + "contributor_last_name": "Wheeler", + "name": "Rachel Wheeler", + "slug": "wheelerr", + "@type": "Person" + } + ], + "contributor": [], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/publicdomain/zero/1.0/", + "name": "CC0 (Creative Commons Zero)" + } + } + }, + { + "id": 98, + "title": "Quick Check: An Alternative to Pop Quizzes (IUPUI)", + "slug": "quick-check-iupui", + "author": 19729, + "comment_count": 0, + "menu_order": 5, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 70, + "link": "https://iu.pressbooks.pub/resourceconveniencestore/chapter/quick-check-iupui/", + "chapter-type": [], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "Quick Check: An Alternative to Pop Quizzes (IUPUI)", + "showTitle": "on", + "inLanguage": "en", + "isPartOf": "Resources for Teaching: Inspiration and Sources from IUPUI and Beyond", + "position": 5, + "editor": [ + { + "contributor_first_name": "Anna", + "contributor_last_name": "Comer", + "name": "Anna Comer", + "slug": "anncomer", + "@type": "Person" + } + ], + "author": [ + { + "contributor_first_name": "Rachel", + "contributor_last_name": "Wheeler", + "name": "Rachel Wheeler", + "slug": "wheelerr", + "@type": "Person" + } + ], + "contributor": [], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/publicdomain/zero/1.0/", + "name": "CC0 (Creative Commons Zero)" + } + } + }, + { + "id": 173, + "title": "Tool Finder: A Database of Online Tools (IUPUI)", + "slug": "tool-finder-iupui", + "author": 19729, + "comment_count": 0, + "menu_order": 6, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 57, + "link": "https://iu.pressbooks.pub/resourceconveniencestore/chapter/tool-finder-iupui/", + "chapter-type": [], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "Tool Finder: A Database of Online Tools (IUPUI)", + "showTitle": "on", + "inLanguage": "en", + "isPartOf": "Resources for Teaching: Inspiration and Sources from IUPUI and Beyond", + "position": 6, + "editor": [ + { + "contributor_first_name": "Anna", + "contributor_last_name": "Comer", + "name": "Anna Comer", + "slug": "anncomer", + "@type": "Person" + } + ], + "author": [ + { + "contributor_first_name": "Rachel", + "contributor_last_name": "Wheeler", + "name": "Rachel Wheeler", + "slug": "wheelerr", + "@type": "Person" + } + ], + "contributor": [], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/publicdomain/zero/1.0/", + "name": "CC0 (Creative Commons Zero)" + } + } + }, + { + "id": 105, + "title": "VoiceThread: Comment on Images and Videos Using Audio (IUPUI)", + "slug": "voicethread-iupui", + "author": 19729, + "comment_count": 0, + "menu_order": 7, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 61, + "link": "https://iu.pressbooks.pub/resourceconveniencestore/chapter/voicethread-iupui/", + "chapter-type": [], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "VoiceThread: Comment on Images and Videos Using Audio (IUPUI)", + "showTitle": "on", + "inLanguage": "en", + "isPartOf": "Resources for Teaching: Inspiration and Sources from IUPUI and Beyond", + "position": 7, + "editor": [ + { + "contributor_first_name": "Anna", + "contributor_last_name": "Comer", + "name": "Anna Comer", + "slug": "anncomer", + "@type": "Person" + } + ], + "author": [ + { + "contributor_first_name": "Rachel", + "contributor_last_name": "Wheeler", + "name": "Rachel Wheeler", + "slug": "wheelerr", + "@type": "Person" + } + ], + "contributor": [], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/publicdomain/zero/1.0/", + "name": "CC0 (Creative Commons Zero)" + } + } + }, + { + "id": 103, + "title": "Zotero: Collect and Organize Bibliographies Online (IUPUI)", + "slug": "zotero-iupui", + "author": 19729, + "comment_count": 0, + "menu_order": 8, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 98, + "link": "https://iu.pressbooks.pub/resourceconveniencestore/chapter/zotero-iupui/", + "chapter-type": [], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "Zotero: Collect and Organize Bibliographies Online (IUPUI)", + "showTitle": "on", + "inLanguage": "en", + "isPartOf": "Resources for Teaching: Inspiration and Sources from IUPUI and Beyond", + "position": 8, + "editor": [ + { + "contributor_first_name": "Anna", + "contributor_last_name": "Comer", + "name": "Anna Comer", + "slug": "anncomer", + "@type": "Person" + } + ], + "author": [ + { + "contributor_first_name": "Rachel", + "contributor_last_name": "Wheeler", + "name": "Rachel Wheeler", + "slug": "wheelerr", + "@type": "Person" + } + ], + "contributor": [], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/publicdomain/zero/1.0/", + "name": "CC0 (Creative Commons Zero)" + } + } + }, + { + "id": 277, + "title": "Zoom: Learn More About Using Zoom (IUPUI)", + "slug": "zoom-learn-more-about-using-zoom-iupui", + "author": 19729, + "comment_count": 0, + "menu_order": 9, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 14, + "link": "https://iu.pressbooks.pub/resourceconveniencestore/chapter/zoom-learn-more-about-using-zoom-iupui/", + "chapter-type": [], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "Zoom: Learn More About Using Zoom (IUPUI)", + "showTitle": "on", + "inLanguage": "en", + "isPartOf": "Resources for Teaching: Inspiration and Sources from IUPUI and Beyond", + "position": 9, + "editor": [ + { + "contributor_first_name": "Anna", + "contributor_last_name": "Comer", + "name": "Anna Comer", + "slug": "anncomer", + "@type": "Person" + } + ], + "author": [ + { + "contributor_first_name": "Rachel", + "contributor_last_name": "Wheeler", + "name": "Rachel Wheeler", + "slug": "wheelerr", + "@type": "Person" + } + ], + "contributor": [], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/publicdomain/zero/1.0/", + "name": "CC0 (Creative Commons Zero)" + } + } + }, + { + "id": 183, + "title": "Digital Teaching Toolkit: Tools and Approaches to Digital Learning (External)", + "slug": "digital-teaching-toolkit-external", + "author": 19729, + "comment_count": 0, + "menu_order": 10, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 47, + "link": "https://iu.pressbooks.pub/resourceconveniencestore/chapter/digital-teaching-toolkit-external/", + "chapter-type": [], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "Digital Teaching Toolkit: Tools and Approaches to Digital Learning (External)", + "showTitle": "on", + "inLanguage": "en", + "isPartOf": "Resources for Teaching: Inspiration and Sources from IUPUI and Beyond", + "position": 10, + "editor": [ + { + "contributor_first_name": "Anna", + "contributor_last_name": "Comer", + "name": "Anna Comer", + "slug": "anncomer", + "@type": "Person" + } + ], + "author": [ + { + "contributor_first_name": "Rachel", + "contributor_last_name": "Wheeler", + "name": "Rachel Wheeler", + "slug": "wheelerr", + "@type": "Person" + } + ], + "contributor": [], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/publicdomain/zero/1.0/", + "name": "CC0 (Creative Commons Zero)" + } + } + }, + { + "id": 92, + "title": "Group Annotation: Collaborative Annotation through Hypothesis (External)", + "slug": "group-annotation-external", + "author": 19729, + "comment_count": 0, + "menu_order": 11, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 70, + "link": "https://iu.pressbooks.pub/resourceconveniencestore/chapter/group-annotation-external/", + "chapter-type": [], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "Group Annotation: Collaborative Annotation through Hypothesis (External)", + "showTitle": "on", + "inLanguage": "en", + "isPartOf": "Resources for Teaching: Inspiration and Sources from IUPUI and Beyond", + "position": 11, + "editor": [ + { + "contributor_first_name": "Anna", + "contributor_last_name": "Comer", + "name": "Anna Comer", + "slug": "anncomer", + "@type": "Person" + } + ], + "author": [ + { + "contributor_first_name": "Rachel", + "contributor_last_name": "Wheeler", + "name": "Rachel Wheeler", + "slug": "wheelerr", + "@type": "Person" + } + ], + "contributor": [], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/publicdomain/zero/1.0/", + "name": "CC0 (Creative Commons Zero)" + } + } + }, + { + "id": 75, + "title": "Flipgrid: Video Discussion Board (External)", + "slug": "flipgrid-video-discussion-board-external", + "author": 19729, + "comment_count": 0, + "menu_order": 12, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 57, + "link": "https://iu.pressbooks.pub/resourceconveniencestore/chapter/flipgrid-video-discussion-board-external/", + "chapter-type": [], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "Flipgrid: Video Discussion Board (External)", + "showTitle": "on", + "inLanguage": "en", + "isPartOf": "Resources for Teaching: Inspiration and Sources from IUPUI and Beyond", + "position": 12, + "editor": [ + { + "contributor_first_name": "Anna", + "contributor_last_name": "Comer", + "name": "Anna Comer", + "slug": "anncomer", + "@type": "Person" + } + ], + "author": [ + { + "contributor_first_name": "Rachel", + "contributor_last_name": "Wheeler", + "name": "Rachel Wheeler", + "slug": "wheelerr", + "@type": "Person" + } + ], + "contributor": [], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/publicdomain/zero/1.0/", + "name": "CC0 (Creative Commons Zero)" + } + } + }, + { + "id": 73, + "title": "Improving Breakout Room Discussions with Collaborative Documents: Facilitating Discussions (External)", + "slug": "improving-breakout-room-discussions-with-collaborative-documents", + "author": 19729, + "comment_count": 0, + "menu_order": 13, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 25, + "link": "https://iu.pressbooks.pub/resourceconveniencestore/chapter/improving-breakout-room-discussions-with-collaborative-documents/", + "chapter-type": [], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "Improving Breakout Room Discussions with Collaborative Documents: Facilitating Discussions (External)", + "showTitle": "on", + "inLanguage": "en", + "isPartOf": "Resources for Teaching: Inspiration and Sources from IUPUI and Beyond", + "position": 13, + "editor": [ + { + "contributor_first_name": "Anna", + "contributor_last_name": "Comer", + "name": "Anna Comer", + "slug": "anncomer", + "@type": "Person" + } + ], + "author": [ + { + "contributor_first_name": "Rachel", + "contributor_last_name": "Wheeler", + "name": "Rachel Wheeler", + "slug": "wheelerr", + "@type": "Person" + } + ], + "contributor": [], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/publicdomain/zero/1.0/", + "name": "CC0 (Creative Commons Zero)" + } + } + }, + { + "id": 82, + "title": "Kahoot: A Fun Trivia Study Tool (External)", + "slug": "kahoot-external", + "author": 19729, + "comment_count": 0, + "menu_order": 14, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 52, + "link": "https://iu.pressbooks.pub/resourceconveniencestore/chapter/kahoot-external/", + "chapter-type": [], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "Kahoot: A Fun Trivia Study Tool (External)", + "showTitle": "on", + "inLanguage": "en", + "isPartOf": "Resources for Teaching: Inspiration and Sources from IUPUI and Beyond", + "position": 14, + "editor": [ + { + "contributor_first_name": "Anna", + "contributor_last_name": "Comer", + "name": "Anna Comer", + "slug": "anncomer", + "@type": "Person" + } + ], + "author": [ + { + "contributor_first_name": "Rachel", + "contributor_last_name": "Wheeler", + "name": "Rachel Wheeler", + "slug": "wheelerr", + "@type": "Person" + } + ], + "contributor": [], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/publicdomain/zero/1.0/", + "name": "CC0 (Creative Commons Zero)" + } + } + }, + { + "id": 175, + "title": "Kialo: Learn How to Map Argument Structure (External)", + "slug": "kialo-external", + "author": 19729, + "comment_count": 0, + "menu_order": 15, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 84, + "link": "https://iu.pressbooks.pub/resourceconveniencestore/chapter/kialo-external/", + "chapter-type": [], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "Kialo: Learn How to Map Argument Structure (External)", + "showTitle": "on", + "inLanguage": "en", + "isPartOf": "Resources for Teaching: Inspiration and Sources from IUPUI and Beyond", + "position": 15, + "editor": [ + { + "contributor_first_name": "Anna", + "contributor_last_name": "Comer", + "name": "Anna Comer", + "slug": "anncomer", + "@type": "Person" + } + ], + "author": [ + { + "contributor_first_name": "Rachel", + "contributor_last_name": "Wheeler", + "name": "Rachel Wheeler", + "slug": "wheelerr", + "@type": "Person" + } + ], + "contributor": [], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/publicdomain/zero/1.0/", + "name": "CC0 (Creative Commons Zero)" + } + } + }, + { + "id": 171, + "title": "Netiquette: Teach Students How to Communicate Respectfully (External)", + "slug": "netiquette-external", + "author": 19729, + "comment_count": 0, + "menu_order": 16, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 44, + "link": "https://iu.pressbooks.pub/resourceconveniencestore/chapter/netiquette-external/", + "chapter-type": [], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "Netiquette: Teach Students How to Communicate Respectfully (External)", + "showTitle": "on", + "inLanguage": "en", + "isPartOf": "Resources for Teaching: Inspiration and Sources from IUPUI and Beyond", + "position": 16, + "editor": [ + { + "contributor_first_name": "Anna", + "contributor_last_name": "Comer", + "name": "Anna Comer", + "slug": "anncomer", + "@type": "Person" + } + ], + "author": [ + { + "contributor_first_name": "Rachel", + "contributor_last_name": "Wheeler", + "name": "Rachel Wheeler", + "slug": "wheelerr", + "@type": "Person" + } + ], + "contributor": [], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/publicdomain/zero/1.0/", + "name": "CC0 (Creative Commons Zero)" + } + } + }, + { + "id": 165, + "title": "Online Teaching Techniques and Tips: Using Apps in Your Course (External)", + "slug": "online-teaching-techniques-and-tips-external", + "author": 19729, + "comment_count": 0, + "menu_order": 17, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 41, + "link": "https://iu.pressbooks.pub/resourceconveniencestore/chapter/online-teaching-techniques-and-tips-external/", + "chapter-type": [], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "Online Teaching Techniques and Tips: Using Apps in Your Course (External)", + "showTitle": "on", + "inLanguage": "en", + "isPartOf": "Resources for Teaching: Inspiration and Sources from IUPUI and Beyond", + "position": 17, + "editor": [ + { + "contributor_first_name": "Anna", + "contributor_last_name": "Comer", + "name": "Anna Comer", + "slug": "anncomer", + "@type": "Person" + } + ], + "author": [ + { + "contributor_first_name": "Rachel", + "contributor_last_name": "Wheeler", + "name": "Rachel Wheeler", + "slug": "wheelerr", + "@type": "Person" + } + ], + "contributor": [], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/publicdomain/zero/1.0/", + "name": "CC0 (Creative Commons Zero)" + } + } + }, + { + "id": 84, + "title": "Polling Software: Engage Students with Polls (External)", + "slug": "polling-software-external", + "author": 19729, + "comment_count": 0, + "menu_order": 18, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 29, + "link": "https://iu.pressbooks.pub/resourceconveniencestore/chapter/polling-software-external/", + "chapter-type": [], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "Polling Software: Engage Students with Polls (External)", + "showTitle": "on", + "inLanguage": "en", + "isPartOf": "Resources for Teaching: Inspiration and Sources from IUPUI and Beyond", + "position": 18, + "editor": [ + { + "contributor_first_name": "Anna", + "contributor_last_name": "Comer", + "name": "Anna Comer", + "slug": "anncomer", + "@type": "Person" + } + ], + "author": [ + { + "contributor_first_name": "Rachel", + "contributor_last_name": "Wheeler", + "name": "Rachel Wheeler", + "slug": "wheelerr", + "@type": "Person" + } + ], + "contributor": [], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/publicdomain/zero/1.0/", + "name": "CC0 (Creative Commons Zero)" + } + } + }, + { + "id": 46, + "title": "What Makes a Great Instructional Video (External)", + "slug": "what-makes-a-great-instructional-video", + "author": 19729, + "comment_count": 0, + "menu_order": 19, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 21, + "link": "https://iu.pressbooks.pub/resourceconveniencestore/chapter/what-makes-a-great-instructional-video/", + "chapter-type": [ + 48 + ], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "What Makes a Great Instructional Video (External)", + "alternateName": "Instructional Videos (External)", + "showTitle": "on", + "inLanguage": "en", + "isPartOf": "Resources for Teaching: Inspiration and Sources from IUPUI and Beyond", + "editor": [ + { + "contributor_first_name": "Anna", + "contributor_last_name": "Comer", + "name": "Anna Comer", + "slug": "anncomer", + "@type": "Person" + } + ], + "author": [ + { + "contributor_first_name": "Rachel", + "contributor_last_name": "Wheeler", + "name": "Rachel Wheeler", + "slug": "wheelerr", + "@type": "Person" + } + ], + "contributor": [], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/publicdomain/zero/1.0/", + "name": "CC0 (Creative Commons Zero)" + } + } + } + ], + "link": "https://iu.pressbooks.pub/resourceconveniencestore/part/gas-tech-how-tos/" + }, + { + "id": 39, + "title": "Snacks: Small Assignments", + "slug": "snacks-small-assignments", + "author": 19729, + "comment_count": 0, + "menu_order": 2, + "status": "publish", + "export": true, + "has_post_content": false, + "word_count": 0, + "chapters": [ + { + "id": 64, + "title": "Active Listening Exercise: Self-Evaluation through Discussion Posts (IUPUI)", + "slug": "active-listening-exercise-iupui", + "author": 19729, + "comment_count": 0, + "menu_order": 1, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 233, + "link": "https://iu.pressbooks.pub/resourceconveniencestore/chapter/active-listening-exercise-iupui/", + "chapter-type": [], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "Active Listening Exercise: Self-Evaluation through Discussion Posts (IUPUI)", + "showTitle": "on", + "inLanguage": "en", + "isPartOf": "Resources for Teaching: Inspiration and Sources from IUPUI and Beyond", + "position": 19, + "editor": [ + { + "contributor_first_name": "Anna", + "contributor_last_name": "Comer", + "name": "Anna Comer", + "slug": "anncomer", + "@type": "Person" + } + ], + "author": [ + { + "contributor_first_name": "Rachel", + "contributor_last_name": "Wheeler", + "name": "Rachel Wheeler", + "slug": "wheelerr", + "@type": "Person" + } + ], + "contributor": [], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/licenses/by/4.0/", + "name": "CC BY (Attribution)" + } + } + }, + { + "id": 113, + "title": "Introduce Yourself Discussion w/ Video (IUPUI)", + "slug": "introduce-yourself-discussion-w-video-iupui", + "author": 19729, + "comment_count": 0, + "menu_order": 2, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 53, + "link": "https://iu.pressbooks.pub/resourceconveniencestore/chapter/introduce-yourself-discussion-w-video-iupui/", + "chapter-type": [], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "Introduce Yourself Discussion w/ Video (IUPUI)", + "showTitle": "on", + "inLanguage": "en", + "isPartOf": "Resources for Teaching: Inspiration and Sources from IUPUI and Beyond", + "position": 20, + "editor": [ + { + "contributor_first_name": "Anna", + "contributor_last_name": "Comer", + "name": "Anna Comer", + "slug": "anncomer", + "@type": "Person" + } + ], + "author": [ + { + "contributor_first_name": "Rachel", + "contributor_last_name": "Wheeler", + "name": "Rachel Wheeler", + "slug": "wheelerr", + "@type": "Person" + } + ], + "contributor": [], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/publicdomain/zero/1.0/", + "name": "CC0 (Creative Commons Zero)" + } + } + }, + { + "id": 60, + "title": "Using Social Media in Assignments: Example (IUPUI)", + "slug": "using-social-media-in-assignments-example-iupui", + "author": 19729, + "comment_count": 0, + "menu_order": 3, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 51, + "link": "https://iu.pressbooks.pub/resourceconveniencestore/chapter/using-social-media-in-assignments-example-iupui/", + "chapter-type": [], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "Using Social Media in Assignments: Example (IUPUI)", + "showTitle": "on", + "inLanguage": "en", + "isPartOf": "Resources for Teaching: Inspiration and Sources from IUPUI and Beyond", + "position": 21, + "editor": [ + { + "contributor_first_name": "Anna", + "contributor_last_name": "Comer", + "name": "Anna Comer", + "slug": "anncomer", + "@type": "Person" + } + ], + "author": [ + { + "contributor_first_name": "Rachel", + "contributor_last_name": "Wheeler", + "name": "Rachel Wheeler", + "slug": "wheelerr", + "@type": "Person" + } + ], + "contributor": [], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/publicdomain/mark/1.0/", + "name": "Public Domain" + } + } + }, + { + "id": 179, + "title": "4 Lessons from Moving a Face-to-Face Course Online: Exploring Helpful Tools (External)", + "slug": "4-lessons-from-moving-a-face-to-face-course-online-external", + "author": 19729, + "comment_count": 0, + "menu_order": 4, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 59, + "link": "https://iu.pressbooks.pub/resourceconveniencestore/chapter/4-lessons-from-moving-a-face-to-face-course-online-external/", + "chapter-type": [], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "4 Lessons from Moving a Face-to-Face Course Online: Exploring Helpful Tools (External)", + "showTitle": "on", + "inLanguage": "en", + "isPartOf": "Resources for Teaching: Inspiration and Sources from IUPUI and Beyond", + "position": 22, + "editor": [ + { + "contributor_first_name": "Anna", + "contributor_last_name": "Comer", + "name": "Anna Comer", + "slug": "anncomer", + "@type": "Person" + } + ], + "author": [ + { + "contributor_first_name": "Rachel", + "contributor_last_name": "Wheeler", + "name": "Rachel Wheeler", + "slug": "wheelerr", + "@type": "Person" + } + ], + "contributor": [], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/publicdomain/zero/1.0/", + "name": "CC0 (Creative Commons Zero)" + } + } + }, + { + "id": 88, + "title": "Discussions/Discussion Alternatives for Asynchronous Courses (External)", + "slug": "discussions-discussion-alternatives-external", + "author": 19729, + "comment_count": 0, + "menu_order": 5, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 1343, + "link": "https://iu.pressbooks.pub/resourceconveniencestore/chapter/discussions-discussion-alternatives-external/", + "chapter-type": [], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "Discussions/Discussion Alternatives for Asynchronous Courses (External)", + "showTitle": "on", + "inLanguage": "en", + "isPartOf": "Resources for Teaching: Inspiration and Sources from IUPUI and Beyond", + "position": 23, + "editor": [ + { + "contributor_first_name": "Anna", + "contributor_last_name": "Comer", + "name": "Anna Comer", + "slug": "anncomer", + "@type": "Person" + } + ], + "author": [ + { + "contributor_first_name": "Rachel", + "contributor_last_name": "Wheeler", + "name": "Rachel Wheeler", + "slug": "wheelerr", + "@type": "Person" + } + ], + "contributor": [], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/publicdomain/zero/1.0/", + "name": "CC0 (Creative Commons Zero)" + } + } + }, + { + "id": 187, + "title": "Online Group Work: Tips for Promoting Collaboration (External)", + "slug": "online-group-work-external", + "author": 19729, + "comment_count": 0, + "menu_order": 6, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 72, + "link": "https://iu.pressbooks.pub/resourceconveniencestore/chapter/online-group-work-external/", + "chapter-type": [], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "Online Group Work: Tips for Promoting Collaboration (External)", + "showTitle": "on", + "inLanguage": "en", + "isPartOf": "Resources for Teaching: Inspiration and Sources from IUPUI and Beyond", + "position": 24, + "editor": [ + { + "contributor_first_name": "Anna", + "contributor_last_name": "Comer", + "name": "Anna Comer", + "slug": "anncomer", + "@type": "Person" + } + ], + "author": [ + { + "contributor_first_name": "Rachel", + "contributor_last_name": "Wheeler", + "name": "Rachel Wheeler", + "slug": "wheelerr", + "@type": "Person" + } + ], + "contributor": [], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/publicdomain/zero/1.0/", + "name": "CC0 (Creative Commons Zero)" + } + } + }, + { + "id": 90, + "title": "Padlet: A Visual Discussion Board (External)", + "slug": "padlet-external", + "author": 19729, + "comment_count": 0, + "menu_order": 7, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 64, + "link": "https://iu.pressbooks.pub/resourceconveniencestore/chapter/padlet-external/", + "chapter-type": [], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "Padlet: A Visual Discussion Board (External)", + "showTitle": "on", + "inLanguage": "en", + "isPartOf": "Resources for Teaching: Inspiration and Sources from IUPUI and Beyond", + "position": 25, + "editor": [ + { + "contributor_first_name": "Anna", + "contributor_last_name": "Comer", + "name": "Anna Comer", + "slug": "anncomer", + "@type": "Person" + } + ], + "author": [ + { + "contributor_first_name": "Rachel", + "contributor_last_name": "Wheeler", + "name": "Rachel Wheeler", + "slug": "wheelerr", + "@type": "Person" + } + ], + "contributor": [], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/publicdomain/zero/1.0/", + "name": "CC0 (Creative Commons Zero)" + } + } + }, + { + "id": 48, + "title": "Talia Vestri Teaching Tips: Weekly Communication, Asynchronous Courses, and Repurposing Slideshows(External)", + "slug": "talia-vestri-teaching-tips", + "author": 19729, + "comment_count": 0, + "menu_order": 8, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 69, + "link": "https://iu.pressbooks.pub/resourceconveniencestore/chapter/talia-vestri-teaching-tips/", + "chapter-type": [], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "Talia Vestri Teaching Tips: Weekly Communication, Asynchronous Courses, and Repurposing Slideshows(External)", + "alternateName": "Teaching Tips (External)", + "showTitle": "on", + "inLanguage": "en", + "isPartOf": "Resources for Teaching: Inspiration and Sources from IUPUI and Beyond", + "position": 26, + "editor": [ + { + "contributor_first_name": "Anna", + "contributor_last_name": "Comer", + "name": "Anna Comer", + "slug": "anncomer", + "@type": "Person" + } + ], + "author": [ + { + "contributor_first_name": "Rachel", + "contributor_last_name": "Wheeler", + "name": "Rachel Wheeler", + "slug": "wheelerr", + "@type": "Person" + } + ], + "contributor": [], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/publicdomain/zero/1.0/", + "name": "CC0 (Creative Commons Zero)" + } + } + }, + { + "id": 181, + "title": "Teaching American History Online: Examples of Online Class Assignments (External)", + "slug": "teaching-american-history-online-external", + "author": 19729, + "comment_count": 0, + "menu_order": 9, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 31, + "link": "https://iu.pressbooks.pub/resourceconveniencestore/chapter/teaching-american-history-online-external/", + "chapter-type": [], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "Teaching American History Online: Examples of Online Class Assignments (External)", + "showTitle": "on", + "inLanguage": "en", + "isPartOf": "Resources for Teaching: Inspiration and Sources from IUPUI and Beyond", + "position": 27, + "editor": [ + { + "contributor_first_name": "Anna", + "contributor_last_name": "Comer", + "name": "Anna Comer", + "slug": "anncomer", + "@type": "Person" + } + ], + "author": [ + { + "contributor_first_name": "Rachel", + "contributor_last_name": "Wheeler", + "name": "Rachel Wheeler", + "slug": "wheelerr", + "@type": "Person" + } + ], + "contributor": [], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/publicdomain/zero/1.0/", + "name": "CC0 (Creative Commons Zero)" + } + } + }, + { + "id": 189, + "title": "Tips from HASTAC: How to Move an In-Person Class Online (External)", + "slug": "tips-from-hastac-external", + "author": 19729, + "comment_count": 0, + "menu_order": 10, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 49, + "link": "https://iu.pressbooks.pub/resourceconveniencestore/chapter/tips-from-hastac-external/", + "chapter-type": [], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "Tips from HASTAC: How to Move an In-Person Class Online (External)", + "showTitle": "on", + "inLanguage": "en", + "isPartOf": "Resources for Teaching: Inspiration and Sources from IUPUI and Beyond", + "position": 28, + "editor": [ + { + "contributor_first_name": "Anna", + "contributor_last_name": "Comer", + "name": "Anna Comer", + "slug": "anncomer", + "@type": "Person" + } + ], + "author": [ + { + "contributor_first_name": "Rachel", + "contributor_last_name": "Wheeler", + "name": "Rachel Wheeler", + "slug": "wheelerr", + "@type": "Person" + } + ], + "contributor": [], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/publicdomain/zero/1.0/", + "name": "CC0 (Creative Commons Zero)" + } + } + }, + { + "id": 185, + "title": "Zoom: In-Class Activities/Assignments (External)", + "slug": "zoom-in-class-activities-assignments-external", + "author": 19729, + "comment_count": 0, + "menu_order": 11, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 38, + "link": "https://iu.pressbooks.pub/resourceconveniencestore/chapter/zoom-in-class-activities-assignments-external/", + "chapter-type": [], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "Zoom: In-Class Activities/Assignments (External)", + "showTitle": "on", + "inLanguage": "en", + "isPartOf": "Resources for Teaching: Inspiration and Sources from IUPUI and Beyond", + "position": 29, + "editor": [ + { + "contributor_first_name": "Anna", + "contributor_last_name": "Comer", + "name": "Anna Comer", + "slug": "anncomer", + "@type": "Person" + } + ], + "author": [ + { + "contributor_first_name": "Rachel", + "contributor_last_name": "Wheeler", + "name": "Rachel Wheeler", + "slug": "wheelerr", + "@type": "Person" + } + ], + "contributor": [], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/publicdomain/zero/1.0/", + "name": "CC0 (Creative Commons Zero)" + } + } + } + ], + "link": "https://iu.pressbooks.pub/resourceconveniencestore/part/snacks-small-assignments/" + }, + { + "id": 41, + "title": "Meals: Big Assignments", + "slug": "meals-big-assignments", + "author": 19729, + "comment_count": 0, + "menu_order": 3, + "status": "publish", + "export": true, + "has_post_content": false, + "word_count": 0, + "chapters": [ + { + "id": 50, + "title": "Clio: An Alternative to Traditional Research Papers (External)", + "slug": "clio-entry", + "author": 19729, + "comment_count": 0, + "menu_order": 1, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 657, + "link": "https://iu.pressbooks.pub/resourceconveniencestore/chapter/clio-entry/", + "chapter-type": [], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "Clio: An Alternative to Traditional Research Papers (External)", + "alternateName": "Clio (External)", + "showTitle": "on", + "inLanguage": "en", + "isPartOf": "Resources for Teaching: Inspiration and Sources from IUPUI and Beyond", + "position": 30, + "editor": [ + { + "contributor_first_name": "Anna", + "contributor_last_name": "Comer", + "name": "Anna Comer", + "slug": "anncomer", + "@type": "Person" + } + ], + "author": [ + { + "contributor_first_name": "Rachel", + "contributor_last_name": "Wheeler", + "name": "Rachel Wheeler", + "slug": "wheelerr", + "@type": "Person" + } + ], + "contributor": [], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/publicdomain/zero/1.0/", + "name": "CC0 (Creative Commons Zero)" + } + } + }, + { + "id": 239, + "title": "Podcasts (IUPUI)", + "slug": "podcasts-iupui", + "author": 19729, + "comment_count": 0, + "menu_order": 2, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 200, + "link": "https://iu.pressbooks.pub/resourceconveniencestore/chapter/podcasts-iupui/", + "chapter-type": [], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "Podcasts (IUPUI)", + "showTitle": "on", + "inLanguage": "en", + "isPartOf": "Resources for Teaching: Inspiration and Sources from IUPUI and Beyond", + "position": 31, + "editor": [ + { + "contributor_first_name": "Anna", + "contributor_last_name": "Comer", + "name": "Anna Comer", + "slug": "anncomer", + "@type": "Person" + } + ], + "author": [ + { + "contributor_first_name": "Rachel", + "contributor_last_name": "Wheeler", + "name": "Rachel Wheeler", + "slug": "wheelerr", + "@type": "Person" + } + ], + "contributor": [], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/publicdomain/zero/1.0/", + "name": "CC0 (Creative Commons Zero)" + } + } + } + ], + "link": "https://iu.pressbooks.pub/resourceconveniencestore/part/meals-big-assignments/" + } + ], + "back-matter": [ + { + "id": 6, + "title": "Appendix", + "slug": "appendix", + "author": 19729, + "comment_count": 0, + "menu_order": 1, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 11, + "link": "https://iu.pressbooks.pub/resourceconveniencestore/back-matter/appendix/", + "back-matter-type": [ + 27 + ], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "Appendix", + "inLanguage": "en", + "isPartOf": "Resources for Teaching: Inspiration and Sources from IUPUI and Beyond", + "editor": [ + { + "contributor_first_name": "Anna", + "contributor_last_name": "Comer", + "name": "Anna Comer", + "slug": "anncomer", + "@type": "Person" + } + ], + "author": [ + { + "contributor_first_name": "Rachel", + "contributor_last_name": "Wheeler", + "name": "Rachel Wheeler", + "slug": "wheelerr", + "@type": "Person" + } + ], + "contributor": [], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/publicdomain/zero/1.0/", + "name": "CC0 (Creative Commons Zero)" + } + } + } + ], + "clone_token": "594360df9c2adf6e550c2ab90df88573", + "_links": { + "front-matter": [ + { + "embeddable": true, + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/front-matter/193" + } + ], + "metadata": [ + { + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/front-matter/193/metadata" + }, + { + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/109/metadata" + }, + { + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/101/metadata" + }, + { + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/120/metadata" + }, + { + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/111/metadata" + }, + { + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/98/metadata" + }, + { + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/173/metadata" + }, + { + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/105/metadata" + }, + { + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/103/metadata" + }, + { + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/277/metadata" + }, + { + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/183/metadata" + }, + { + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/92/metadata" + }, + { + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/75/metadata" + }, + { + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/73/metadata" + }, + { + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/82/metadata" + }, + { + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/175/metadata" + }, + { + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/171/metadata" + }, + { + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/165/metadata" + }, + { + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/84/metadata" + }, + { + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/46/metadata" + }, + { + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/64/metadata" + }, + { + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/113/metadata" + }, + { + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/60/metadata" + }, + { + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/179/metadata" + }, + { + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/88/metadata" + }, + { + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/187/metadata" + }, + { + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/90/metadata" + }, + { + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/48/metadata" + }, + { + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/181/metadata" + }, + { + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/189/metadata" + }, + { + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/185/metadata" + }, + { + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/50/metadata" + }, + { + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/239/metadata" + }, + { + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/back-matter/6/metadata" + } + ], + "chapter": [ + { + "embeddable": true, + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/109" + }, + { + "embeddable": true, + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/101" + }, + { + "embeddable": true, + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/120" + }, + { + "embeddable": true, + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/111" + }, + { + "embeddable": true, + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/98" + }, + { + "embeddable": true, + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/173" + }, + { + "embeddable": true, + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/105" + }, + { + "embeddable": true, + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/103" + }, + { + "embeddable": true, + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/277" + }, + { + "embeddable": true, + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/183" + }, + { + "embeddable": true, + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/92" + }, + { + "embeddable": true, + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/75" + }, + { + "embeddable": true, + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/73" + }, + { + "embeddable": true, + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/82" + }, + { + "embeddable": true, + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/175" + }, + { + "embeddable": true, + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/171" + }, + { + "embeddable": true, + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/165" + }, + { + "embeddable": true, + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/84" + }, + { + "embeddable": true, + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/46" + }, + { + "embeddable": true, + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/64" + }, + { + "embeddable": true, + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/113" + }, + { + "embeddable": true, + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/60" + }, + { + "embeddable": true, + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/179" + }, + { + "embeddable": true, + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/88" + }, + { + "embeddable": true, + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/187" + }, + { + "embeddable": true, + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/90" + }, + { + "embeddable": true, + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/48" + }, + { + "embeddable": true, + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/181" + }, + { + "embeddable": true, + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/189" + }, + { + "embeddable": true, + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/185" + }, + { + "embeddable": true, + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/50" + }, + { + "embeddable": true, + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/chapters/239" + } + ], + "part": [ + { + "embeddable": true, + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/parts/37" + }, + { + "embeddable": true, + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/parts/39" + }, + { + "embeddable": true, + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/parts/41" + } + ], + "back-matter": [ + { + "embeddable": true, + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/back-matter/6" + } + ], + "self": [ + { + "href": "https://iu.pressbooks.pub/resourceconveniencestore/wp-json/pressbooks/v2/toc", + "targetHints": { + "allow": [ + "GET" + ] + } + } + ] + } +} \ No newline at end of file diff --git a/tests/url_collector/resources/pb_toc2.json b/tests/url_collector/resources/pb_toc2.json new file mode 100644 index 0000000..24ce460 --- /dev/null +++ b/tests/url_collector/resources/pb_toc2.json @@ -0,0 +1,1971 @@ +{ + "front-matter": [ + { + "id": 17, + "title": "WELCOME TO CENTENNIAL COLLEGE", + "slug": "introduction", + "author": 3460, + "comment_count": 0, + "menu_order": 1, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 324, + "link": "https://ecampusontario.pressbooks.pub/2023prehealth/front-matter/introduction/", + "front-matter-type": [ + 12 + ], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "WELCOME TO CENTENNIAL COLLEGE", + "isBasedOn": "https://ecampusontario.pressbooks.pub/programhandbook/front-matter/introduction/", + "inLanguage": "en", + "isPartOf": "2023-2024 Pre-Health Program Handbook", + "copyrightYear": "2021", + "editor": [], + "author": [ + { + "contributor_first_name": "Gina", + "contributor_last_name": "Marshall", + "contributor_institution": "Centennial College", + "name": "Gina Marshall", + "slug": "gmarsha7", + "@type": "Person" + }, + { + "name": "Centennial College", + "slug": "centennial-college", + "@type": "Person" + } + ], + "contributor": [ + { + "contributor_first_name": "Gina", + "contributor_last_name": "Marshall", + "contributor_institution": "Centennial College", + "name": "Gina Marshall", + "slug": "gmarsha7", + "@type": "Person" + }, + { + "contributor_first_name": "Nicole", + "contributor_last_name": "Koss", + "name": "Nicole Koss", + "slug": "nicole-koss", + "@type": "Person" + } + ], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "datePublished": "2023-06-14", + "copyrightHolder": { + "@type": "Organization", + "name": "Centennial College" + }, + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/licenses/by-nc-sa/4.0/", + "name": "CC BY-NC-SA (Attribution NonCommercial ShareAlike)" + } + } + } + ], + "parts": [ + { + "id": 19, + "title": "COVID-19 Update", + "slug": "covid-19-update-2", + "author": 3460, + "comment_count": 0, + "menu_order": 1, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 140, + "chapters": [], + "link": "https://ecampusontario.pressbooks.pub/2023prehealth/part/covid-19-update-2/" + }, + { + "id": 20, + "title": "Acknowledgement of Traditional Lands", + "slug": "acknowledgement-of-traditional-lands-indigenous-education", + "author": 3460, + "comment_count": 0, + "menu_order": 2, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 130, + "chapters": [], + "link": "https://ecampusontario.pressbooks.pub/2023prehealth/part/acknowledgement-of-traditional-lands-indigenous-education/" + }, + { + "id": 22, + "title": "Indigenous Education at Centennial College", + "slug": "indigenous-education-at-centennial-college", + "author": 3460, + "comment_count": 0, + "menu_order": 3, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 98, + "chapters": [], + "link": "https://ecampusontario.pressbooks.pub/2023prehealth/part/indigenous-education-at-centennial-college/" + }, + { + "id": 23, + "title": "School and Department Information", + "slug": "main-body", + "author": 3460, + "comment_count": 0, + "menu_order": 4, + "status": "publish", + "export": true, + "has_post_content": false, + "word_count": 0, + "chapters": [ + { + "id": 24, + "title": "Welcome from the Dean", + "slug": "chapter-1", + "author": 3460, + "comment_count": 0, + "menu_order": 1, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 232, + "link": "https://ecampusontario.pressbooks.pub/2023prehealth/chapter/chapter-1/", + "chapter-type": [ + 49 + ], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "Welcome from the Dean", + "isBasedOn": "https://ecampusontario.pressbooks.pub/programhandbook/chapter/chapter-1/", + "inLanguage": "en", + "isPartOf": "2023-2024 Pre-Health Program Handbook", + "copyrightYear": "2021", + "editor": [], + "author": [ + { + "contributor_first_name": "Gina", + "contributor_last_name": "Marshall", + "contributor_institution": "Centennial College", + "name": "Gina Marshall", + "slug": "gmarsha7", + "@type": "Person" + }, + { + "name": "Centennial College", + "slug": "centennial-college", + "@type": "Person" + } + ], + "contributor": [ + { + "contributor_first_name": "Gina", + "contributor_last_name": "Marshall", + "contributor_institution": "Centennial College", + "name": "Gina Marshall", + "slug": "gmarsha7", + "@type": "Person" + }, + { + "contributor_first_name": "Nicole", + "contributor_last_name": "Koss", + "name": "Nicole Koss", + "slug": "nicole-koss", + "@type": "Person" + } + ], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "datePublished": "2023-06-14", + "copyrightHolder": { + "@type": "Organization", + "name": "Centennial College" + }, + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/licenses/by-nc-sa/4.0/", + "name": "CC BY-NC-SA (Attribution NonCommercial ShareAlike)" + } + } + }, + { + "id": 27, + "title": "About the School", + "slug": "about-the-school", + "author": 3460, + "comment_count": 0, + "menu_order": 2, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 57, + "link": "https://ecampusontario.pressbooks.pub/2023prehealth/chapter/about-the-school/", + "chapter-type": [ + 49 + ], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "About the School", + "isBasedOn": "https://ecampusontario.pressbooks.pub/programhandbook/chapter/about-the-school/", + "inLanguage": "en", + "isPartOf": "2023-2024 Pre-Health Program Handbook", + "copyrightYear": "2021", + "editor": [], + "author": [ + { + "contributor_first_name": "Gina", + "contributor_last_name": "Marshall", + "contributor_institution": "Centennial College", + "name": "Gina Marshall", + "slug": "gmarsha7", + "@type": "Person" + }, + { + "name": "Centennial College", + "slug": "centennial-college", + "@type": "Person" + } + ], + "contributor": [ + { + "contributor_first_name": "Gina", + "contributor_last_name": "Marshall", + "contributor_institution": "Centennial College", + "name": "Gina Marshall", + "slug": "gmarsha7", + "@type": "Person" + }, + { + "contributor_first_name": "Nicole", + "contributor_last_name": "Koss", + "name": "Nicole Koss", + "slug": "nicole-koss", + "@type": "Person" + } + ], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "datePublished": "2023-06-14", + "copyrightHolder": { + "@type": "Organization", + "name": "Centennial College" + }, + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/licenses/by-nc-sa/4.0/", + "name": "CC BY-NC-SA (Attribution NonCommercial ShareAlike)" + } + } + }, + { + "id": 30, + "title": "Program Team", + "slug": "program-team", + "author": 3460, + "comment_count": 0, + "menu_order": 3, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 254, + "link": "https://ecampusontario.pressbooks.pub/2023prehealth/chapter/program-team/", + "chapter-type": [ + 49 + ], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "Program Team", + "isBasedOn": "https://ecampusontario.pressbooks.pub/programhandbook/chapter/program-team/", + "inLanguage": "en", + "isPartOf": "2023-2024 Pre-Health Program Handbook", + "copyrightYear": "2021", + "editor": [], + "author": [ + { + "contributor_first_name": "Gina", + "contributor_last_name": "Marshall", + "contributor_institution": "Centennial College", + "name": "Gina Marshall", + "slug": "gmarsha7", + "@type": "Person" + }, + { + "name": "Centennial College", + "slug": "centennial-college", + "@type": "Person" + } + ], + "contributor": [ + { + "contributor_first_name": "Gina", + "contributor_last_name": "Marshall", + "contributor_institution": "Centennial College", + "name": "Gina Marshall", + "slug": "gmarsha7", + "@type": "Person" + }, + { + "contributor_first_name": "Nicole", + "contributor_last_name": "Koss", + "name": "Nicole Koss", + "slug": "nicole-koss", + "@type": "Person" + } + ], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "datePublished": "2023-06-14", + "copyrightHolder": { + "@type": "Organization", + "name": "Centennial College" + }, + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/licenses/by-nc-sa/4.0/", + "name": "CC BY-NC-SA (Attribution NonCommercial ShareAlike)" + } + } + }, + { + "id": 32, + "title": "School Communications", + "slug": "school-communications", + "author": 3460, + "comment_count": 0, + "menu_order": 4, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 249, + "link": "https://ecampusontario.pressbooks.pub/2023prehealth/chapter/school-communications/", + "chapter-type": [ + 49 + ], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "School Communications", + "isBasedOn": "https://ecampusontario.pressbooks.pub/programhandbook/chapter/school-communications/", + "inLanguage": "en", + "isPartOf": "2023-2024 Pre-Health Program Handbook", + "copyrightYear": "2021", + "editor": [], + "author": [ + { + "contributor_first_name": "Gina", + "contributor_last_name": "Marshall", + "contributor_institution": "Centennial College", + "name": "Gina Marshall", + "slug": "gmarsha7", + "@type": "Person" + }, + { + "name": "Centennial College", + "slug": "centennial-college", + "@type": "Person" + } + ], + "contributor": [ + { + "contributor_first_name": "Gina", + "contributor_last_name": "Marshall", + "contributor_institution": "Centennial College", + "name": "Gina Marshall", + "slug": "gmarsha7", + "@type": "Person" + }, + { + "contributor_first_name": "Nicole", + "contributor_last_name": "Koss", + "name": "Nicole Koss", + "slug": "nicole-koss", + "@type": "Person" + } + ], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "datePublished": "2023-06-14", + "copyrightHolder": { + "@type": "Organization", + "name": "Centennial College" + }, + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/licenses/by-nc-sa/4.0/", + "name": "CC BY-NC-SA (Attribution NonCommercial ShareAlike)" + } + } + }, + { + "id": 34, + "title": "Important Dates", + "slug": "important-dates", + "author": 3460, + "comment_count": 0, + "menu_order": 5, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 82, + "link": "https://ecampusontario.pressbooks.pub/2023prehealth/chapter/important-dates/", + "chapter-type": [ + 49 + ], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "Important Dates", + "isBasedOn": "https://ecampusontario.pressbooks.pub/programhandbook/chapter/important-dates/", + "inLanguage": "en", + "isPartOf": "2023-2024 Pre-Health Program Handbook", + "copyrightYear": "2021", + "editor": [], + "author": [ + { + "contributor_first_name": "Gina", + "contributor_last_name": "Marshall", + "contributor_institution": "Centennial College", + "name": "Gina Marshall", + "slug": "gmarsha7", + "@type": "Person" + }, + { + "name": "Centennial College", + "slug": "centennial-college", + "@type": "Person" + } + ], + "contributor": [ + { + "contributor_first_name": "Gina", + "contributor_last_name": "Marshall", + "contributor_institution": "Centennial College", + "name": "Gina Marshall", + "slug": "gmarsha7", + "@type": "Person" + }, + { + "contributor_first_name": "Nicole", + "contributor_last_name": "Koss", + "name": "Nicole Koss", + "slug": "nicole-koss", + "@type": "Person" + } + ], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "datePublished": "2023-06-14", + "copyrightHolder": { + "@type": "Organization", + "name": "Centennial College" + }, + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/licenses/by-nc-sa/4.0/", + "name": "CC BY-NC-SA (Attribution NonCommercial ShareAlike)" + } + } + } + ], + "link": "https://ecampusontario.pressbooks.pub/2023prehealth/part/main-body/" + }, + { + "id": 36, + "title": "Program Information", + "slug": "program-information", + "author": 3460, + "comment_count": 0, + "menu_order": 5, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 81, + "chapters": [ + { + "id": 38, + "title": "Program Learning Outcomes and Curriculum", + "slug": "curriculum", + "author": 3460, + "comment_count": 0, + "menu_order": 1, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 439, + "link": "https://ecampusontario.pressbooks.pub/2023prehealth/chapter/curriculum/", + "chapter-type": [ + 49 + ], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "Program Learning Outcomes and Curriculum", + "isBasedOn": "https://ecampusontario.pressbooks.pub/programhandbook/chapter/curriculum/", + "inLanguage": "en", + "isPartOf": "2023-2024 Pre-Health Program Handbook", + "copyrightYear": "2021", + "editor": [], + "author": [ + { + "contributor_first_name": "Gina", + "contributor_last_name": "Marshall", + "contributor_institution": "Centennial College", + "name": "Gina Marshall", + "slug": "gmarsha7", + "@type": "Person" + }, + { + "name": "Centennial College", + "slug": "centennial-college", + "@type": "Person" + } + ], + "contributor": [ + { + "contributor_first_name": "Gina", + "contributor_last_name": "Marshall", + "contributor_institution": "Centennial College", + "name": "Gina Marshall", + "slug": "gmarsha7", + "@type": "Person" + }, + { + "contributor_first_name": "Nicole", + "contributor_last_name": "Koss", + "name": "Nicole Koss", + "slug": "nicole-koss", + "@type": "Person" + } + ], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "datePublished": "2023-06-14", + "copyrightHolder": { + "@type": "Organization", + "name": "Centennial College" + }, + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/licenses/by-nc-sa/4.0/", + "name": "CC BY-NC-SA (Attribution NonCommercial ShareAlike)" + } + } + }, + { + "id": 40, + "title": "Program Model Route", + "slug": "program-model-route", + "author": 3460, + "comment_count": 0, + "menu_order": 2, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 251, + "link": "https://ecampusontario.pressbooks.pub/2023prehealth/chapter/program-model-route/", + "chapter-type": [ + 49 + ], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "Program Model Route", + "isBasedOn": "https://ecampusontario.pressbooks.pub/programhandbook/chapter/program-model-route/", + "inLanguage": "en", + "isPartOf": "2023-2024 Pre-Health Program Handbook", + "copyrightYear": "2021", + "editor": [], + "author": [ + { + "contributor_first_name": "Gina", + "contributor_last_name": "Marshall", + "contributor_institution": "Centennial College", + "name": "Gina Marshall", + "slug": "gmarsha7", + "@type": "Person" + }, + { + "name": "Centennial College", + "slug": "centennial-college", + "@type": "Person" + } + ], + "contributor": [ + { + "contributor_first_name": "Gina", + "contributor_last_name": "Marshall", + "contributor_institution": "Centennial College", + "name": "Gina Marshall", + "slug": "gmarsha7", + "@type": "Person" + }, + { + "contributor_first_name": "Nicole", + "contributor_last_name": "Koss", + "name": "Nicole Koss", + "slug": "nicole-koss", + "@type": "Person" + } + ], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "datePublished": "2023-06-14", + "copyrightHolder": { + "@type": "Organization", + "name": "Centennial College" + }, + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/licenses/by-nc-sa/4.0/", + "name": "CC BY-NC-SA (Attribution NonCommercial ShareAlike)" + } + } + }, + { + "id": 43, + "title": "Program Requirements", + "slug": "program-requirements", + "author": 3460, + "comment_count": 0, + "menu_order": 3, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 130, + "link": "https://ecampusontario.pressbooks.pub/2023prehealth/chapter/program-requirements/", + "chapter-type": [ + 49 + ], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "Program Requirements", + "isBasedOn": "https://ecampusontario.pressbooks.pub/programhandbook/chapter/program-requirements/", + "inLanguage": "en", + "isPartOf": "2023-2024 Pre-Health Program Handbook", + "copyrightYear": "2021", + "editor": [], + "author": [ + { + "contributor_first_name": "Gina", + "contributor_last_name": "Marshall", + "contributor_institution": "Centennial College", + "name": "Gina Marshall", + "slug": "gmarsha7", + "@type": "Person" + }, + { + "name": "Centennial College", + "slug": "centennial-college", + "@type": "Person" + } + ], + "contributor": [ + { + "contributor_first_name": "Gina", + "contributor_last_name": "Marshall", + "contributor_institution": "Centennial College", + "name": "Gina Marshall", + "slug": "gmarsha7", + "@type": "Person" + }, + { + "contributor_first_name": "Nicole", + "contributor_last_name": "Koss", + "name": "Nicole Koss", + "slug": "nicole-koss", + "@type": "Person" + } + ], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "datePublished": "2023-06-14", + "copyrightHolder": { + "@type": "Organization", + "name": "Centennial College" + }, + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/licenses/by-nc-sa/4.0/", + "name": "CC BY-NC-SA (Attribution NonCommercial ShareAlike)" + } + } + }, + { + "id": 46, + "title": "Experiential Learning Requirements", + "slug": "experiential-learning-requirements", + "author": 3460, + "comment_count": 0, + "menu_order": 4, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 99, + "link": "https://ecampusontario.pressbooks.pub/2023prehealth/chapter/experiential-learning-requirements/", + "chapter-type": [ + 49 + ], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "Experiential Learning Requirements", + "isBasedOn": "https://ecampusontario.pressbooks.pub/programhandbook/chapter/experiential-learning-requirements/", + "inLanguage": "en", + "isPartOf": "2023-2024 Pre-Health Program Handbook", + "copyrightYear": "2021", + "editor": [], + "author": [ + { + "contributor_first_name": "Gina", + "contributor_last_name": "Marshall", + "contributor_institution": "Centennial College", + "name": "Gina Marshall", + "slug": "gmarsha7", + "@type": "Person" + }, + { + "name": "Centennial College", + "slug": "centennial-college", + "@type": "Person" + } + ], + "contributor": [ + { + "contributor_first_name": "Gina", + "contributor_last_name": "Marshall", + "contributor_institution": "Centennial College", + "name": "Gina Marshall", + "slug": "gmarsha7", + "@type": "Person" + }, + { + "contributor_first_name": "Nicole", + "contributor_last_name": "Koss", + "name": "Nicole Koss", + "slug": "nicole-koss", + "@type": "Person" + } + ], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "datePublished": "2023-06-14", + "copyrightHolder": { + "@type": "Organization", + "name": "Centennial College" + }, + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/licenses/by-nc-sa/4.0/", + "name": "CC BY-NC-SA (Attribution NonCommercial ShareAlike)" + } + } + }, + { + "id": 48, + "title": "Progression and Graduation Requirements", + "slug": "progression-and-graduation-requirements", + "author": 3460, + "comment_count": 0, + "menu_order": 5, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 275, + "link": "https://ecampusontario.pressbooks.pub/2023prehealth/chapter/progression-and-graduation-requirements/", + "chapter-type": [ + 49 + ], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "Progression and Graduation Requirements", + "isBasedOn": "https://ecampusontario.pressbooks.pub/programhandbook/chapter/progression-and-graduation-requirements/", + "inLanguage": "en", + "isPartOf": "2023-2024 Pre-Health Program Handbook", + "copyrightYear": "2021", + "editor": [], + "author": [ + { + "contributor_first_name": "Gina", + "contributor_last_name": "Marshall", + "contributor_institution": "Centennial College", + "name": "Gina Marshall", + "slug": "gmarsha7", + "@type": "Person" + }, + { + "name": "Centennial College", + "slug": "centennial-college", + "@type": "Person" + } + ], + "contributor": [ + { + "contributor_first_name": "Gina", + "contributor_last_name": "Marshall", + "contributor_institution": "Centennial College", + "name": "Gina Marshall", + "slug": "gmarsha7", + "@type": "Person" + }, + { + "contributor_first_name": "Nicole", + "contributor_last_name": "Koss", + "name": "Nicole Koss", + "slug": "nicole-koss", + "@type": "Person" + } + ], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "datePublished": "2023-06-14", + "copyrightHolder": { + "@type": "Organization", + "name": "Centennial College" + }, + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/licenses/by-nc-sa/4.0/", + "name": "CC BY-NC-SA (Attribution NonCommercial ShareAlike)" + } + } + }, + { + "id": 51, + "title": "Program Modalities and Requirements", + "slug": "program-modalities-and-requirements", + "author": 3460, + "comment_count": 0, + "menu_order": 6, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 131, + "link": "https://ecampusontario.pressbooks.pub/2023prehealth/chapter/program-modalities-and-requirements/", + "chapter-type": [ + 49 + ], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "Program Modalities and Requirements", + "isBasedOn": "https://ecampusontario.pressbooks.pub/programhandbook/chapter/program-modalities-and-requirements/", + "inLanguage": "en", + "isPartOf": "2023-2024 Pre-Health Program Handbook", + "copyrightYear": "2021", + "editor": [], + "author": [ + { + "contributor_first_name": "Gina", + "contributor_last_name": "Marshall", + "contributor_institution": "Centennial College", + "name": "Gina Marshall", + "slug": "gmarsha7", + "@type": "Person" + }, + { + "name": "Centennial College", + "slug": "centennial-college", + "@type": "Person" + } + ], + "contributor": [ + { + "contributor_first_name": "Gina", + "contributor_last_name": "Marshall", + "contributor_institution": "Centennial College", + "name": "Gina Marshall", + "slug": "gmarsha7", + "@type": "Person" + }, + { + "contributor_first_name": "Nicole", + "contributor_last_name": "Koss", + "name": "Nicole Koss", + "slug": "nicole-koss", + "@type": "Person" + } + ], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "datePublished": "2023-06-14", + "copyrightHolder": { + "@type": "Organization", + "name": "Centennial College" + }, + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/licenses/by-nc-sa/4.0/", + "name": "CC BY-NC-SA (Attribution NonCommercial ShareAlike)" + } + } + }, + { + "id": 53, + "title": "Program Learning Resources and Facilities", + "slug": "program-learning-resources-and-facilities", + "author": 3460, + "comment_count": 0, + "menu_order": 7, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 416, + "link": "https://ecampusontario.pressbooks.pub/2023prehealth/chapter/program-learning-resources-and-facilities/", + "chapter-type": [ + 49 + ], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "Program Learning Resources and Facilities", + "isBasedOn": "https://ecampusontario.pressbooks.pub/programhandbook/chapter/program-learning-resources-and-facilities/", + "inLanguage": "en", + "isPartOf": "2023-2024 Pre-Health Program Handbook", + "copyrightYear": "2021", + "editor": [], + "author": [ + { + "contributor_first_name": "Gina", + "contributor_last_name": "Marshall", + "contributor_institution": "Centennial College", + "name": "Gina Marshall", + "slug": "gmarsha7", + "@type": "Person" + }, + { + "name": "Centennial College", + "slug": "centennial-college", + "@type": "Person" + } + ], + "contributor": [ + { + "contributor_first_name": "Gina", + "contributor_last_name": "Marshall", + "contributor_institution": "Centennial College", + "name": "Gina Marshall", + "slug": "gmarsha7", + "@type": "Person" + }, + { + "contributor_first_name": "Nicole", + "contributor_last_name": "Koss", + "name": "Nicole Koss", + "slug": "nicole-koss", + "@type": "Person" + } + ], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "datePublished": "2023-06-14", + "copyrightHolder": { + "@type": "Organization", + "name": "Centennial College" + }, + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/licenses/by-nc-sa/4.0/", + "name": "CC BY-NC-SA (Attribution NonCommercial ShareAlike)" + } + } + }, + { + "id": 55, + "title": "Program Pathways and Certifications", + "slug": "program-pathways-and-certifications", + "author": 3460, + "comment_count": 0, + "menu_order": 8, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 437, + "link": "https://ecampusontario.pressbooks.pub/2023prehealth/chapter/program-pathways-and-certifications/", + "chapter-type": [ + 49 + ], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "Program Pathways and Certifications", + "isBasedOn": "https://ecampusontario.pressbooks.pub/programhandbook/chapter/program-pathways-and-certifications/", + "inLanguage": "en", + "isPartOf": "2023-2024 Pre-Health Program Handbook", + "copyrightYear": "2021", + "editor": [], + "author": [ + { + "contributor_first_name": "Gina", + "contributor_last_name": "Marshall", + "contributor_institution": "Centennial College", + "name": "Gina Marshall", + "slug": "gmarsha7", + "@type": "Person" + }, + { + "name": "Centennial College", + "slug": "centennial-college", + "@type": "Person" + } + ], + "contributor": [ + { + "contributor_first_name": "Gina", + "contributor_last_name": "Marshall", + "contributor_institution": "Centennial College", + "name": "Gina Marshall", + "slug": "gmarsha7", + "@type": "Person" + }, + { + "contributor_first_name": "Nicole", + "contributor_last_name": "Koss", + "name": "Nicole Koss", + "slug": "nicole-koss", + "@type": "Person" + } + ], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "datePublished": "2023-06-14", + "copyrightHolder": { + "@type": "Organization", + "name": "Centennial College" + }, + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/licenses/by-nc-sa/4.0/", + "name": "CC BY-NC-SA (Attribution NonCommercial ShareAlike)" + } + } + } + ], + "link": "https://ecampusontario.pressbooks.pub/2023prehealth/part/program-information/" + }, + { + "id": 57, + "title": "Policies", + "slug": "policies", + "author": 3460, + "comment_count": 0, + "menu_order": 6, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 47, + "chapters": [ + { + "id": 58, + "title": "School, Department, and Program Policies", + "slug": "school-department-and-program-policies", + "author": 3460, + "comment_count": 0, + "menu_order": 1, + "status": "publish", + "export": true, + "has_post_content": false, + "word_count": 0, + "link": "https://ecampusontario.pressbooks.pub/2023prehealth/chapter/school-department-and-program-policies/", + "chapter-type": [ + 49 + ], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "School, Department, and Program Policies", + "isBasedOn": "https://ecampusontario.pressbooks.pub/programhandbook/chapter/school-department-and-program-policies/", + "inLanguage": "en", + "isPartOf": "2023-2024 Pre-Health Program Handbook", + "copyrightYear": "2021", + "editor": [], + "author": [ + { + "contributor_first_name": "Gina", + "contributor_last_name": "Marshall", + "contributor_institution": "Centennial College", + "name": "Gina Marshall", + "slug": "gmarsha7", + "@type": "Person" + }, + { + "name": "Centennial College", + "slug": "centennial-college", + "@type": "Person" + } + ], + "contributor": [ + { + "contributor_first_name": "Gina", + "contributor_last_name": "Marshall", + "contributor_institution": "Centennial College", + "name": "Gina Marshall", + "slug": "gmarsha7", + "@type": "Person" + }, + { + "contributor_first_name": "Nicole", + "contributor_last_name": "Koss", + "name": "Nicole Koss", + "slug": "nicole-koss", + "@type": "Person" + } + ], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "datePublished": "2023-06-14", + "copyrightHolder": { + "@type": "Organization", + "name": "Centennial College" + }, + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/licenses/by-nc-sa/4.0/", + "name": "CC BY-NC-SA (Attribution NonCommercial ShareAlike)" + } + } + }, + { + "id": 60, + "title": "Recognition of Prior Learning", + "slug": "recognition-of-prior-learning", + "author": 3460, + "comment_count": 0, + "menu_order": 2, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 343, + "link": "https://ecampusontario.pressbooks.pub/2023prehealth/chapter/recognition-of-prior-learning/", + "chapter-type": [ + 49 + ], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "Recognition of Prior Learning", + "isBasedOn": "https://ecampusontario.pressbooks.pub/programhandbook/chapter/recognition-of-prior-learning/", + "inLanguage": "en", + "isPartOf": "2023-2024 Pre-Health Program Handbook", + "copyrightYear": "2021", + "editor": [], + "author": [ + { + "contributor_first_name": "Gina", + "contributor_last_name": "Marshall", + "contributor_institution": "Centennial College", + "name": "Gina Marshall", + "slug": "gmarsha7", + "@type": "Person" + }, + { + "name": "Centennial College", + "slug": "centennial-college", + "@type": "Person" + } + ], + "contributor": [ + { + "contributor_first_name": "Gina", + "contributor_last_name": "Marshall", + "contributor_institution": "Centennial College", + "name": "Gina Marshall", + "slug": "gmarsha7", + "@type": "Person" + }, + { + "contributor_first_name": "Nicole", + "contributor_last_name": "Koss", + "name": "Nicole Koss", + "slug": "nicole-koss", + "@type": "Person" + } + ], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "datePublished": "2023-06-14", + "copyrightHolder": { + "@type": "Organization", + "name": "Centennial College" + }, + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/licenses/by-nc-sa/4.0/", + "name": "CC BY-NC-SA (Attribution NonCommercial ShareAlike)" + } + } + }, + { + "id": 63, + "title": "Assessment and Grading", + "slug": "assessment-and-grading", + "author": 3460, + "comment_count": 0, + "menu_order": 3, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 439, + "link": "https://ecampusontario.pressbooks.pub/2023prehealth/chapter/assessment-and-grading/", + "chapter-type": [ + 49 + ], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "Assessment and Grading", + "isBasedOn": "https://ecampusontario.pressbooks.pub/programhandbook/chapter/assessment-and-grading/", + "inLanguage": "en", + "isPartOf": "2023-2024 Pre-Health Program Handbook", + "copyrightYear": "2021", + "editor": [], + "author": [ + { + "contributor_first_name": "Gina", + "contributor_last_name": "Marshall", + "contributor_institution": "Centennial College", + "name": "Gina Marshall", + "slug": "gmarsha7", + "@type": "Person" + }, + { + "name": "Centennial College", + "slug": "centennial-college", + "@type": "Person" + } + ], + "contributor": [ + { + "contributor_first_name": "Gina", + "contributor_last_name": "Marshall", + "contributor_institution": "Centennial College", + "name": "Gina Marshall", + "slug": "gmarsha7", + "@type": "Person" + }, + { + "contributor_first_name": "Nicole", + "contributor_last_name": "Koss", + "name": "Nicole Koss", + "slug": "nicole-koss", + "@type": "Person" + } + ], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "datePublished": "2023-06-14", + "copyrightHolder": { + "@type": "Organization", + "name": "Centennial College" + }, + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/licenses/by-nc-sa/4.0/", + "name": "CC BY-NC-SA (Attribution NonCommercial ShareAlike)" + } + } + }, + { + "id": 65, + "title": "Academic Integrity", + "slug": "academic-integrity", + "author": 3460, + "comment_count": 0, + "menu_order": 4, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 362, + "link": "https://ecampusontario.pressbooks.pub/2023prehealth/chapter/academic-integrity/", + "chapter-type": [ + 49 + ], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "Academic Integrity", + "isBasedOn": "https://ecampusontario.pressbooks.pub/programhandbook/chapter/academic-integrity/", + "inLanguage": "en", + "isPartOf": "2023-2024 Pre-Health Program Handbook", + "copyrightYear": "2021", + "editor": [], + "author": [ + { + "contributor_first_name": "Gina", + "contributor_last_name": "Marshall", + "contributor_institution": "Centennial College", + "name": "Gina Marshall", + "slug": "gmarsha7", + "@type": "Person" + }, + { + "name": "Centennial College", + "slug": "centennial-college", + "@type": "Person" + } + ], + "contributor": [ + { + "contributor_first_name": "Gina", + "contributor_last_name": "Marshall", + "contributor_institution": "Centennial College", + "name": "Gina Marshall", + "slug": "gmarsha7", + "@type": "Person" + }, + { + "contributor_first_name": "Nicole", + "contributor_last_name": "Koss", + "name": "Nicole Koss", + "slug": "nicole-koss", + "@type": "Person" + } + ], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "datePublished": "2023-06-14", + "copyrightHolder": { + "@type": "Organization", + "name": "Centennial College" + }, + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/licenses/by-nc-sa/4.0/", + "name": "CC BY-NC-SA (Attribution NonCommercial ShareAlike)" + } + } + }, + { + "id": 67, + "title": "Conduct and Rights", + "slug": "student-conduct", + "author": 3460, + "comment_count": 0, + "menu_order": 5, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 70, + "link": "https://ecampusontario.pressbooks.pub/2023prehealth/chapter/student-conduct/", + "chapter-type": [ + 49 + ], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "Conduct and Rights", + "isBasedOn": "https://ecampusontario.pressbooks.pub/programhandbook/chapter/student-conduct/", + "inLanguage": "en", + "isPartOf": "2023-2024 Pre-Health Program Handbook", + "copyrightYear": "2021", + "editor": [], + "author": [ + { + "contributor_first_name": "Gina", + "contributor_last_name": "Marshall", + "contributor_institution": "Centennial College", + "name": "Gina Marshall", + "slug": "gmarsha7", + "@type": "Person" + }, + { + "name": "Centennial College", + "slug": "centennial-college", + "@type": "Person" + } + ], + "contributor": [ + { + "contributor_first_name": "Gina", + "contributor_last_name": "Marshall", + "contributor_institution": "Centennial College", + "name": "Gina Marshall", + "slug": "gmarsha7", + "@type": "Person" + }, + { + "contributor_first_name": "Nicole", + "contributor_last_name": "Koss", + "name": "Nicole Koss", + "slug": "nicole-koss", + "@type": "Person" + } + ], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "datePublished": "2023-06-14", + "copyrightHolder": { + "@type": "Organization", + "name": "Centennial College" + }, + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/licenses/by-nc-sa/4.0/", + "name": "CC BY-NC-SA (Attribution NonCommercial ShareAlike)" + } + } + } + ], + "link": "https://ecampusontario.pressbooks.pub/2023prehealth/part/policies/" + }, + { + "id": 70, + "title": "Student Life and Academic Services", + "slug": "student-services", + "author": 3460, + "comment_count": 0, + "menu_order": 7, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 78, + "chapters": [ + { + "id": 72, + "title": "Academic Services", + "slug": "academic-services", + "author": 3460, + "comment_count": 0, + "menu_order": 1, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 317, + "link": "https://ecampusontario.pressbooks.pub/2023prehealth/chapter/academic-services/", + "chapter-type": [ + 49 + ], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "Academic Services", + "isBasedOn": "https://ecampusontario.pressbooks.pub/programhandbook/chapter/academic-services/", + "inLanguage": "en", + "isPartOf": "2023-2024 Pre-Health Program Handbook", + "copyrightYear": "2021", + "editor": [], + "author": [ + { + "contributor_first_name": "Gina", + "contributor_last_name": "Marshall", + "contributor_institution": "Centennial College", + "name": "Gina Marshall", + "slug": "gmarsha7", + "@type": "Person" + }, + { + "name": "Centennial College", + "slug": "centennial-college", + "@type": "Person" + } + ], + "contributor": [ + { + "contributor_first_name": "Gina", + "contributor_last_name": "Marshall", + "contributor_institution": "Centennial College", + "name": "Gina Marshall", + "slug": "gmarsha7", + "@type": "Person" + }, + { + "contributor_first_name": "Nicole", + "contributor_last_name": "Koss", + "name": "Nicole Koss", + "slug": "nicole-koss", + "@type": "Person" + } + ], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "datePublished": "2023-06-14", + "copyrightHolder": { + "@type": "Organization", + "name": "Centennial College" + }, + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/licenses/by-nc-sa/4.0/", + "name": "CC BY-NC-SA (Attribution NonCommercial ShareAlike)" + } + } + }, + { + "id": 75, + "title": "Student Services", + "slug": "student-services", + "author": 3460, + "comment_count": 0, + "menu_order": 2, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 77, + "link": "https://ecampusontario.pressbooks.pub/2023prehealth/chapter/student-services/", + "chapter-type": [ + 49 + ], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "Student Services", + "isBasedOn": "https://ecampusontario.pressbooks.pub/programhandbook/chapter/student-services/", + "inLanguage": "en", + "isPartOf": "2023-2024 Pre-Health Program Handbook", + "copyrightYear": "2021", + "editor": [], + "author": [ + { + "contributor_first_name": "Gina", + "contributor_last_name": "Marshall", + "contributor_institution": "Centennial College", + "name": "Gina Marshall", + "slug": "gmarsha7", + "@type": "Person" + }, + { + "name": "Centennial College", + "slug": "centennial-college", + "@type": "Person" + } + ], + "contributor": [ + { + "contributor_first_name": "Gina", + "contributor_last_name": "Marshall", + "contributor_institution": "Centennial College", + "name": "Gina Marshall", + "slug": "gmarsha7", + "@type": "Person" + }, + { + "contributor_first_name": "Nicole", + "contributor_last_name": "Koss", + "name": "Nicole Koss", + "slug": "nicole-koss", + "@type": "Person" + } + ], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "datePublished": "2023-06-14", + "copyrightHolder": { + "@type": "Organization", + "name": "Centennial College" + }, + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/licenses/by-nc-sa/4.0/", + "name": "CC BY-NC-SA (Attribution NonCommercial ShareAlike)" + } + } + }, + { + "id": 78, + "title": "Student Leadership Opportunities", + "slug": "student-leadership-opportunities", + "author": 3460, + "comment_count": 0, + "menu_order": 3, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 112, + "link": "https://ecampusontario.pressbooks.pub/2023prehealth/chapter/student-leadership-opportunities/", + "chapter-type": [ + 49 + ], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "Student Leadership Opportunities", + "isBasedOn": "https://ecampusontario.pressbooks.pub/programhandbook/chapter/student-leadership-opportunities/", + "inLanguage": "en", + "isPartOf": "2023-2024 Pre-Health Program Handbook", + "copyrightYear": "2021", + "editor": [], + "author": [ + { + "contributor_first_name": "Gina", + "contributor_last_name": "Marshall", + "contributor_institution": "Centennial College", + "name": "Gina Marshall", + "slug": "gmarsha7", + "@type": "Person" + }, + { + "name": "Centennial College", + "slug": "centennial-college", + "@type": "Person" + } + ], + "contributor": [ + { + "contributor_first_name": "Gina", + "contributor_last_name": "Marshall", + "contributor_institution": "Centennial College", + "name": "Gina Marshall", + "slug": "gmarsha7", + "@type": "Person" + }, + { + "contributor_first_name": "Nicole", + "contributor_last_name": "Koss", + "name": "Nicole Koss", + "slug": "nicole-koss", + "@type": "Person" + } + ], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "datePublished": "2023-06-14", + "copyrightHolder": { + "@type": "Organization", + "name": "Centennial College" + }, + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/licenses/by-nc-sa/4.0/", + "name": "CC BY-NC-SA (Attribution NonCommercial ShareAlike)" + } + } + } + ], + "link": "https://ecampusontario.pressbooks.pub/2023prehealth/part/student-services/" + }, + { + "id": 81, + "title": "Record of Changes", + "slug": "record-of-changes", + "author": 3460, + "comment_count": 0, + "menu_order": 8, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 29, + "chapters": [], + "link": "https://ecampusontario.pressbooks.pub/2023prehealth/part/record-of-changes/" + } + ], + "back-matter": [ + { + "id": 83, + "title": "", + "slug": "405", + "author": 3460, + "comment_count": 0, + "menu_order": 1, + "status": "publish", + "export": true, + "has_post_content": true, + "word_count": 0, + "link": "https://ecampusontario.pressbooks.pub/2023prehealth/back-matter/405/", + "back-matter-type": [], + "metadata": { + "@context": "http://schema.org", + "@type": "Chapter", + "name": "", + "isBasedOn": "https://ecampusontario.pressbooks.pub/programhandbook/back-matter/405/", + "inLanguage": "en", + "isPartOf": "2023-2024 Pre-Health Program Handbook", + "copyrightYear": "2021", + "editor": [], + "author": [ + { + "contributor_first_name": "Gina", + "contributor_last_name": "Marshall", + "contributor_institution": "Centennial College", + "name": "Gina Marshall", + "slug": "gmarsha7", + "@type": "Person" + }, + { + "name": "Centennial College", + "slug": "centennial-college", + "@type": "Person" + } + ], + "contributor": [ + { + "contributor_first_name": "Gina", + "contributor_last_name": "Marshall", + "contributor_institution": "Centennial College", + "name": "Gina Marshall", + "slug": "gmarsha7", + "@type": "Person" + }, + { + "contributor_first_name": "Nicole", + "contributor_last_name": "Koss", + "name": "Nicole Koss", + "slug": "nicole-koss", + "@type": "Person" + } + ], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "datePublished": "2023-06-14", + "copyrightHolder": { + "@type": "Organization", + "name": "Centennial College" + }, + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/licenses/by-nc-sa/4.0/", + "name": "CC BY-NC-SA (Attribution NonCommercial ShareAlike)" + } + } + } + ], + "clone_token": "0018ab81e43bbefa54d758fe36a3cfcb", + "_links": { + "front-matter": [ + { + "embeddable": true, + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/front-matter/17" + } + ], + "metadata": [ + { + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/front-matter/17/metadata" + }, + { + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/chapters/24/metadata" + }, + { + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/chapters/27/metadata" + }, + { + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/chapters/30/metadata" + }, + { + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/chapters/32/metadata" + }, + { + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/chapters/34/metadata" + }, + { + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/chapters/38/metadata" + }, + { + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/chapters/40/metadata" + }, + { + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/chapters/43/metadata" + }, + { + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/chapters/46/metadata" + }, + { + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/chapters/48/metadata" + }, + { + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/chapters/51/metadata" + }, + { + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/chapters/53/metadata" + }, + { + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/chapters/55/metadata" + }, + { + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/chapters/58/metadata" + }, + { + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/chapters/60/metadata" + }, + { + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/chapters/63/metadata" + }, + { + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/chapters/65/metadata" + }, + { + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/chapters/67/metadata" + }, + { + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/chapters/72/metadata" + }, + { + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/chapters/75/metadata" + }, + { + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/chapters/78/metadata" + }, + { + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/back-matter/83/metadata" + } + ], + "part": [ + { + "embeddable": true, + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/parts/19" + }, + { + "embeddable": true, + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/parts/20" + }, + { + "embeddable": true, + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/parts/22" + }, + { + "embeddable": true, + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/parts/23" + }, + { + "embeddable": true, + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/parts/36" + }, + { + "embeddable": true, + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/parts/57" + }, + { + "embeddable": true, + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/parts/70" + }, + { + "embeddable": true, + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/parts/81" + } + ], + "chapter": [ + { + "embeddable": true, + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/chapters/24" + }, + { + "embeddable": true, + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/chapters/27" + }, + { + "embeddable": true, + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/chapters/30" + }, + { + "embeddable": true, + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/chapters/32" + }, + { + "embeddable": true, + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/chapters/34" + }, + { + "embeddable": true, + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/chapters/38" + }, + { + "embeddable": true, + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/chapters/40" + }, + { + "embeddable": true, + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/chapters/43" + }, + { + "embeddable": true, + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/chapters/46" + }, + { + "embeddable": true, + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/chapters/48" + }, + { + "embeddable": true, + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/chapters/51" + }, + { + "embeddable": true, + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/chapters/53" + }, + { + "embeddable": true, + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/chapters/55" + }, + { + "embeddable": true, + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/chapters/58" + }, + { + "embeddable": true, + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/chapters/60" + }, + { + "embeddable": true, + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/chapters/63" + }, + { + "embeddable": true, + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/chapters/65" + }, + { + "embeddable": true, + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/chapters/67" + }, + { + "embeddable": true, + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/chapters/72" + }, + { + "embeddable": true, + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/chapters/75" + }, + { + "embeddable": true, + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/chapters/78" + } + ], + "back-matter": [ + { + "embeddable": true, + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/back-matter/83" + } + ], + "self": [ + { + "href": "https://ecampusontario.pressbooks.pub/2023prehealth/wp-json/pressbooks/v2/toc", + "targetHints": { + "allow": [ + "GET" + ] + } + } + ] + } +} \ No newline at end of file diff --git a/tests/url_collector/test_press_books_collector.py b/tests/url_collector/test_press_books_collector.py new file mode 100644 index 0000000..efcd491 --- /dev/null +++ b/tests/url_collector/test_press_books_collector.py @@ -0,0 +1,64 @@ +import json +import unittest +from pathlib import Path +from unittest.mock import Mock, patch + +from welearn_datastack.collectors.oe_books_collector import OpenEditionBooksURLCollector +from welearn_datastack.collectors.press_books_collector import PressBooksURLCollector +from welearn_datastack.data.db_models import Corpus, WeLearnDocument +from welearn_datastack.modules.xml_extractor import XMLExtractor +from welearn_datastack.plugins.scrapers import OpenEditionBooksCollector + + +class MockResponse: + def __init__(self, text, status_code): + self.text = text + self.status_code = status_code + self.content = text.encode("utf-8") + + def raise_for_status(self): + pass + + def json(self): + return json.loads(self.text) + + +class TestPressBooksURLCollector(unittest.TestCase): + def setUp(self): + self.path_json_algolia_resp = ( + Path(__file__).parent / "resources/pb_algolia_response.json" + ) + self.content_json_algolia_resp = self.path_json_algolia_resp.read_text() + self.path_json_toc1 = Path(__file__).parent / "resources/pb_toc1.json" + self.content_json_toc1 = self.path_json_toc1.read_text() + self.path_json_toc2 = Path(__file__).parent / "resources/pb_toc2.json" + self.content_json_toc2 = self.path_json_toc2.read_text() + + @patch("welearn_datastack.collectors.press_books_collector.get_new_https_session") + def test_collect_book_accessible_license_authorized( + self, mock_get_new_http_session + ): + mock_session = Mock() + mock_session.post.return_value = MockResponse( + self.content_json_algolia_resp, 200 + ) + mock_session.get.side_effect = [ + MockResponse(self.content_json_toc1, 200), + MockResponse(self.content_json_toc2, 200), + ] + mock_get_new_http_session.return_value = mock_session + + collector = PressBooksURLCollector( + corpus=Corpus(source_name="press-books"), + qty_books=2, + api_key="such api key", + application_id="such app id", + ) + collected = collector.collect() + + self.assertEqual(len(collected), 57) + awaited_url = "https://ecampusontario.pressbooks.pub/2023prehealth/?p=17" + awaited_url2 = "https://iu.pressbooks.pub/resourceconveniencestore/?p=181" + urls = [u.url for u in collected] + self.assertIn(awaited_url, urls) + self.assertIn(awaited_url2, urls) diff --git a/welearn_datastack/collectors/press_books_collector.py b/welearn_datastack/collectors/press_books_collector.py index 484885a..c044b80 100644 --- a/welearn_datastack/collectors/press_books_collector.py +++ b/welearn_datastack/collectors/press_books_collector.py @@ -37,7 +37,11 @@ def collect(self) -> List[WeLearnDocument]: "x-algolia-api-key": self.api_key, "x-algolia-application-id": self.application_id, } - body = {"hitsPerPage": self.qty_books, "attributesToRetrieve": ["url"]} + body = { + "hitsPerPage": self.qty_books, + "attributesToRetrieve": ["url"], + "filters": "hasInstitutions:true", + } resp_last_books: Response = client.post( url=forged_url, params=params, json=body ) From 761f4eea82dd7743f2546a56fc020aa6810f88a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o?= Date: Thu, 19 Jun 2025 11:17:03 +0200 Subject: [PATCH 04/14] pressbooks content retrievement --- .../plugins/rest_requesters/pressbooks.py | 98 +++++++++++++++++++ welearn_datastack/utils_/scraping_utils.py | 8 ++ 2 files changed, 106 insertions(+) create mode 100644 welearn_datastack/plugins/rest_requesters/pressbooks.py diff --git a/welearn_datastack/plugins/rest_requesters/pressbooks.py b/welearn_datastack/plugins/rest_requesters/pressbooks.py new file mode 100644 index 0000000..827b5d3 --- /dev/null +++ b/welearn_datastack/plugins/rest_requesters/pressbooks.py @@ -0,0 +1,98 @@ +import logging +from cgi import parse +from collections import defaultdict +from datetime import datetime, timezone +from typing import Dict, List, Tuple, TypedDict +from urllib.parse import urlparse, urlunparse + +import requests.exceptions + +from welearn_datastack.constants import AUTHORIZED_LICENSES +from welearn_datastack.data.scraped_welearn_document import ScrapedWeLearnDocument +from welearn_datastack.exceptions import UnauthorizedLicense +from welearn_datastack.plugins.interface import IPluginRESTCollector +from welearn_datastack.utils_.http_client_utils import get_new_https_session +from welearn_datastack.utils_.scraping_utils import ( + clean_return_to_line, + clean_text_keep_punctuation, +) +from welearn_datastack.utils_.text_stat_utils import predict_readability + +logger = logging.getLogger(__name__) + +CONTAINERS_NAME = ["parts", "chapters", "front-matter", "back-matter"] + + +# Collector +class PressBooksCollector(IPluginRESTCollector): + related_corpus = "press-books" + + def _extract_books_main_url(self, urls: List[str]): + ret = defaultdict(list) + for url in urls: + parsed_url = urlparse(url) + book_addr = urlunparse( + ["https", parsed_url.netloc, parsed_url.path, "", "", ""] + ) + post_id = int(parsed_url.query.split("=")[-1]) # Left part + ret[book_addr].append(post_id) + + return ret + + def run(self, urls: List[str]) -> Tuple[List[ScrapedWeLearnDocument], List[str]]: + client = get_new_https_session() + main_urls = self._extract_books_main_url(urls) + + collected_docs: List[ScrapedWeLearnDocument] = [] + error_docs: List[str] = [] + # Get different book containers + for main_url in main_urls: + for container_name in CONTAINERS_NAME: + forged_url = f"{main_url}/wp-json/pressbooks/v2/{container_name}" + container_content = client.get(url=forged_url) + try: + container_content.raise_for_status() + except requests.exceptions.RequestException: + logger.error( + f"Error while retrieving {container_name} for {main_url}: {forged_url}" + ) + continue + container_content = container_content.json() + if not container_content: + logger.warning( + f"No content found for {container_name} in {main_url}" + ) + continue + + for item in container_content: + post_id = item["id"] + if post_id not in main_urls[main_url]: + # Retrieve document doesnt exist in previous retrieved url + logger.warning( + f"Post ID {post_id} not found in main URLs for {main_url}" + ) + error_docs.append(f"{main_url}/?p={post_id}") + continue + metadata_url = item["_links"]["metadata"][0]["href"] + metadata_resp = client.get(metadata_url) + try: + metadata_resp.raise_for_status() + except requests.exceptions.RequestException: + logger.error( + f"Error while retrieving metadata for post ID {post_id} in {main_url}" + ) + error_docs.append(f"{main_url}/?p={post_id}") + continue + metadata = metadata_resp.json() + license_url = metadata["license"]["url"] + if license_url not in AUTHORIZED_LICENSES: + logger.error( + f"Unauthorized license {license_url} for post ID {post_id} in {main_url}" + ) + error_docs.append(f"{main_url}/?p={post_id}") + continue + title = metadata["name"] + + # Content stuff + not_formatted_content = item["content"]["raw"] + content = clean_text_keep_punctuation(not_formatted_content) diff --git a/welearn_datastack/utils_/scraping_utils.py b/welearn_datastack/utils_/scraping_utils.py index 5009611..4542ba1 100644 --- a/welearn_datastack/utils_/scraping_utils.py +++ b/welearn_datastack/utils_/scraping_utils.py @@ -61,6 +61,14 @@ def format_cc_license(license: str) -> str: ) +def clean_text_keep_punctuation(text): + # Remplace les retours à la ligne et autres espaces spéciaux par un espace + text = re.sub(r"\s+", " ", text) + # Conserve lettres, chiffres, ponctuation de base et espace + text = re.sub(r'[^a-zA-Z0-9\s.,!?;:\'"\-()]', "", text) + return text.strip() + + def get_url_license_from_dc_format(soup: BeautifulSoup) -> str: """ Extract the license of the document from the DC.rights meta tag. From 180ff2fdb26d5e1c64848bb8b8803002285923ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o?= Date: Fri, 20 Jun 2025 16:17:13 +0200 Subject: [PATCH 05/14] =?UTF-8?q?d=C3=A9tails=20stuff?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plugins/rest_requesters/pressbooks.py | 122 ++++++++++++++++-- 1 file changed, 113 insertions(+), 9 deletions(-) diff --git a/welearn_datastack/plugins/rest_requesters/pressbooks.py b/welearn_datastack/plugins/rest_requesters/pressbooks.py index 827b5d3..a3da8ce 100644 --- a/welearn_datastack/plugins/rest_requesters/pressbooks.py +++ b/welearn_datastack/plugins/rest_requesters/pressbooks.py @@ -1,32 +1,38 @@ import logging -from cgi import parse from collections import defaultdict -from datetime import datetime, timezone -from typing import Dict, List, Tuple, TypedDict +from datetime import datetime +from typing import List, Tuple from urllib.parse import urlparse, urlunparse import requests.exceptions +import spacy from welearn_datastack.constants import AUTHORIZED_LICENSES from welearn_datastack.data.scraped_welearn_document import ScrapedWeLearnDocument -from welearn_datastack.exceptions import UnauthorizedLicense from welearn_datastack.plugins.interface import IPluginRESTCollector from welearn_datastack.utils_.http_client_utils import get_new_https_session from welearn_datastack.utils_.scraping_utils import ( clean_return_to_line, + clean_text, clean_text_keep_punctuation, + remove_html_tags, ) -from welearn_datastack.utils_.text_stat_utils import predict_readability logger = logging.getLogger(__name__) CONTAINERS_NAME = ["parts", "chapters", "front-matter", "back-matter"] +nlp_model = spacy.load("xx_sent_ud_sm") + # Collector class PressBooksCollector(IPluginRESTCollector): related_corpus = "press-books" + @staticmethod + def _create_pressbook_id(main_url: str, post_id: int): + return f"{main_url}?p={post_id}" + def _extract_books_main_url(self, urls: List[str]): ret = defaultdict(list) for url in urls: @@ -39,6 +45,17 @@ def _extract_books_main_url(self, urls: List[str]): return ret + @staticmethod + def _extract_three_first_sentences(text: str) -> str: + """ + Extracts the first three sentences from a given text. + :param text: The input text from which to extract sentences. + :return: A string containing the first three sentences. + """ + doc = nlp_model(text) + sentences = [sent.text for sent in doc.sents] + return " ".join(sentences[:3]) if len(sentences) >= 3 else text + def run(self, urls: List[str]) -> Tuple[List[ScrapedWeLearnDocument], List[str]]: client = get_new_https_session() main_urls = self._extract_books_main_url(urls) @@ -66,12 +83,13 @@ def run(self, urls: List[str]) -> Tuple[List[ScrapedWeLearnDocument], List[str]] for item in container_content: post_id = item["id"] + url = self._create_pressbook_id(main_url, post_id) if post_id not in main_urls[main_url]: # Retrieve document doesnt exist in previous retrieved url logger.warning( f"Post ID {post_id} not found in main URLs for {main_url}" ) - error_docs.append(f"{main_url}/?p={post_id}") + error_docs.append(url) continue metadata_url = item["_links"]["metadata"][0]["href"] metadata_resp = client.get(metadata_url) @@ -81,7 +99,7 @@ def run(self, urls: List[str]) -> Tuple[List[ScrapedWeLearnDocument], List[str]] logger.error( f"Error while retrieving metadata for post ID {post_id} in {main_url}" ) - error_docs.append(f"{main_url}/?p={post_id}") + error_docs.append(url) continue metadata = metadata_resp.json() license_url = metadata["license"]["url"] @@ -89,10 +107,96 @@ def run(self, urls: List[str]) -> Tuple[List[ScrapedWeLearnDocument], List[str]] logger.error( f"Unauthorized license {license_url} for post ID {post_id} in {main_url}" ) - error_docs.append(f"{main_url}/?p={post_id}") + error_docs.append(url) continue title = metadata["name"] # Content stuff not_formatted_content = item["content"]["raw"] - content = clean_text_keep_punctuation(not_formatted_content) + content = clean_text(not_formatted_content) + + # Date stuff + pubdate: float | None + if "date_gmt" in metadata: + collected_pubdate = metadata["date_gmt"] + pubdate = datetime.strptime( + collected_pubdate, "%Y-%m-%dT%H:%M:%S" + ).timestamp() + elif "datePublished" in metadata: + # Fallback for datePublished + collected_pubdate = metadata["datePublished"] + pubdate = datetime.strptime( + collected_pubdate, "%Y-%m-%d" + ).timestamp() + else: + logger.warning( + f"No publication date found for post ID {post_id} in {main_url}" + ) + pubdate = None + + update_date: float | None + if "modified_gmt" in metadata: + collected_update_date = metadata["modified_gmt"] + update_date = datetime.strptime( + collected_update_date, "%Y-%m-%dT%H:%M:%S" + ).timestamp() + else: + logger.warning( + f"No update date found for post ID {post_id} in {main_url}" + ) + update_date = None + + # Authors stuff + authors = [] + for author in metadata["author"]: + authors.append( + { + "name": author["name"], + "misc": author.get("contributor_institution"), + } + ) + + # Editors stuff + editors = [] + for editor in metadata["editor"]: + editors.append( + { + "name": editor["name"], + } + ) + + publisher = metadata.get("publisher", {}).get("name") + + details = { + "license": license_url, + "update_date": update_date, + "publication_date": pubdate, + "authors": authors, + "editors": editors, + "publisher": publisher, + "type": container_name, + "partOf": {"element": main_url, "order": None}, + } + + collected_docs.append( + ScrapedWeLearnDocument( + document_title=title, + document_url=url, + document_content=content, + document_corpus=self.related_corpus, + document_desc=self._extract_three_first_sentences(content), + document_details=details, + ) + ) + return collected_docs, error_docs + + +if __name__ == "__main__": + # Example usage + collector = PressBooksCollector() + urls = [ + "https://wtcs.pressbooks.pub/communications/?p=5", + ] + scraped_docs, error_docs = collector.run(urls) + print(f"Scraped Documents: {len(scraped_docs)}") + print(f"Error Documents: {len(error_docs)}") From ff7307fed656759f52e47ae12cc3d61dfb00f76e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o?= Date: Fri, 20 Jun 2025 16:17:43 +0200 Subject: [PATCH 06/14] rm comment + add new cleanup method in clean text --- welearn_datastack/utils_/scraping_utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/welearn_datastack/utils_/scraping_utils.py b/welearn_datastack/utils_/scraping_utils.py index 4542ba1..3a58eea 100644 --- a/welearn_datastack/utils_/scraping_utils.py +++ b/welearn_datastack/utils_/scraping_utils.py @@ -62,9 +62,7 @@ def format_cc_license(license: str) -> str: def clean_text_keep_punctuation(text): - # Remplace les retours à la ligne et autres espaces spéciaux par un espace text = re.sub(r"\s+", " ", text) - # Conserve lettres, chiffres, ponctuation de base et espace text = re.sub(r'[^a-zA-Z0-9\s.,!?;:\'"\-()]', "", text) return text.strip() @@ -148,7 +146,9 @@ def clean_text(content: str) -> str: Returns: str: the cleaned content """ - return remove_extra_whitespace(remove_html_tags(content)).strip() + return clean_text_keep_punctuation( + remove_extra_whitespace(remove_html_tags(content)) + ).strip() def get_url_without_hal_like_versionning(url: str) -> str: From 09018c8824c62243a0e3ba383216d4bd0111175c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o?= Date: Fri, 20 Jun 2025 16:54:24 +0200 Subject: [PATCH 07/14] start of unit test --- .../plugins_test/test_pressbooks.py | 137 ++++++++++++++++++ .../resources/pb_chapter_5_metadata.json | 57 ++++++++ .../resources/pb_chapters.json | 128 ++++++++++++++++ .../plugins/rest_requesters/pressbooks.py | 7 +- 4 files changed, 323 insertions(+), 6 deletions(-) create mode 100644 tests/document_collector_hub/plugins_test/test_pressbooks.py create mode 100644 tests/document_collector_hub/resources/pb_chapter_5_metadata.json create mode 100644 tests/document_collector_hub/resources/pb_chapters.json diff --git a/tests/document_collector_hub/plugins_test/test_pressbooks.py b/tests/document_collector_hub/plugins_test/test_pressbooks.py new file mode 100644 index 0000000..179ad4c --- /dev/null +++ b/tests/document_collector_hub/plugins_test/test_pressbooks.py @@ -0,0 +1,137 @@ +import json +import os +from pathlib import Path +from unittest import TestCase +from unittest.mock import Mock, patch + +import requests + +from welearn_datastack.constants import AUTHORIZED_LICENSES +from welearn_datastack.data.enumerations import PluginType +from welearn_datastack.plugins.rest_requesters.pressbooks import PressBooksCollector + + +class MockResponse: + def __init__(self, json_data, status_code=200): + self._json = json_data + self.status_code = status_code + + def json(self): + return self._json + + def raise_for_status(self): + if self.status_code >= 400: + raise requests.exceptions.HTTPError() + + +class TestPressBooksCollector(TestCase): + def setUp(self): + self.collector = PressBooksCollector() + self.mock_base_path = Path(__file__).parent.parent / "resources" + + with open(self.mock_base_path / "pb_chapter_5_metadata.json") as f: + self.mock_metadata = json.load(f) + + with open(self.mock_base_path / "pb_chapters.json") as f: + self.mock_chapters = json.load(f) + + def test_plugin_type(self): + self.assertEqual(PressBooksCollector.collector_type_name, PluginType.REST) + + def test_plugin_related_corpus(self): + self.assertEqual(PressBooksCollector.related_corpus, "press-books") + + @patch("welearn_datastack.plugins.rest_requesters.pressbooks.get_new_https_session") + def test_run_success(self, mock_get_session): + mock_session = Mock() + mock_get_session.return_value = mock_session + + def mock_get(url, *args, **kwargs): + if url.endswith("/chapters"): + return MockResponse(self.mock_chapters) + elif url.endswith("/chapters/5/metadata/"): + return MockResponse(self.mock_metadata) + else: + return MockResponse([], 404) + + mock_session.get.side_effect = mock_get + + urls = ["https://wtcs.pressbooks.pub/communications/?p=5"] + collected_docs, error_docs = self.collector.run(urls) + + self.assertEqual(len(collected_docs), 1) + doc = collected_docs[0] + self.assertEqual(doc.document_title, self.mock_metadata["name"]) + self.assertTrue( + doc.document_content.startswith( + "Chapter 1: Introduction to Communication Situations" + ) + ) + self.assertEqual( + doc.document_details["license"], self.mock_metadata["license"]["url"] + ) + self.assertEqual(doc.document_details["authors"][0]["name"], "Jane Doe") + self.assertEqual(doc.document_details["editors"][0]["name"], "John Smith") + self.assertEqual(doc.document_details["publisher"], "WisTech Open") + self.assertEqual(doc.document_details["type"], "chapters") + + def test__extract_three_first_sentences(self): + text = "This is one. This is two. This is three. This is four." + result = self.collector._extract_three_first_sentences(text) + self.assertEqual(result, "This is one. This is two. This is three.") + + def test__extract_books_main_url(self): + urls = [ + "https://example.com/book/?p=42", + "https://example.com/book/?p=99", + ] + result = self.collector._extract_books_main_url(urls) + self.assertIn("https://example.com/book/", result) + self.assertIn(42, result["https://example.com/book/"]) + self.assertIn(99, result["https://example.com/book/"]) + + @patch("welearn_datastack.plugins.rest_requesters.pressbooks.get_new_https_session") + def test_run_unauthorized_license(self, mock_get_session): + mock_session = Mock() + mock_get_session.return_value = mock_session + + # Modifier la licence pour une non autorisée + bad_metadata = self.mock_metadata.copy() + bad_metadata["license"]["url"] = "http://unauthorized.license.org" + + def mock_get(url, *args, **kwargs): + if url.endswith("/chapters"): + return MockResponse(self.mock_chapters) + elif url.endswith("/chapters/5/metadata/"): + return MockResponse(bad_metadata) + return MockResponse([], 404) + + mock_session.get.side_effect = mock_get + + urls = ["https://wtcs.pressbooks.pub/communications/?p=5"] + collected_docs, error_docs = self.collector.run(urls) + + self.assertEqual(len(collected_docs), 0) + self.assertEqual(len(error_docs), 1) + self.assertTrue( + "https://wtcs.pressbooks.pub/communications/?p=5" in error_docs[0] + ) + + @patch("welearn_datastack.plugins.rest_requesters.pressbooks.get_new_https_session") + def test_run_http_error_on_container(self, mock_get_session): + mock_session = Mock() + mock_get_session.return_value = mock_session + + # Simuler une erreur 500 sur les containers + def mock_get(url, *args, **kwargs): + if "chapters" in url: + return MockResponse({}, status_code=500) + return MockResponse([], 404) + + mock_session.get.side_effect = mock_get + + urls = ["https://wtcs.pressbooks.pub/communications/?p=5"] + collected_docs, error_docs = self.collector.run(urls) + + self.assertEqual(collected_docs, []) + self.assertEqual(error_docs, []) diff --git a/tests/document_collector_hub/resources/pb_chapter_5_metadata.json b/tests/document_collector_hub/resources/pb_chapter_5_metadata.json new file mode 100644 index 0000000..5d1c105 --- /dev/null +++ b/tests/document_collector_hub/resources/pb_chapter_5_metadata.json @@ -0,0 +1,57 @@ +{ + "@context": "http://schema.org", + "@type": "Chapter", + "name": "Chapter 1: Introduction to Communication Situations", + "inLanguage": "en", + "isPartOf": "Oral/Interpersonal Communication", + "editor": [ + { + "name": "John Smith", + "slug": "John Smith", + "@type": "Person" + } + ], + "author": [ + { + "name": "Jane Doe", + "slug": "Jane Doe", + "@type": "Person" + } + ], + "contributor": [], + "translator": [], + "reviewedBy": [], + "illustrator": [], + "publisher": { + "@type": "Organization", + "name": "WisTech Open" + }, + "datePublished": "2025-06-30", + "copyrightYear": "2025", + "copyrightHolder": { + "@type": "Organization", + "name": "WisTech Open" + }, + "license": { + "@type": "CreativeWork", + "url": "https://creativecommons.org/licenses/by/4.0/", + "name": "CC BY (Attribution)" + }, + "_links": { + "self": [ + { + "href": "https://wtcs.pressbooks.pub/communications/wp-json/pressbooks/v2/chapters/5/metadata", + "targetHints": { + "allow": [ + "GET" + ] + } + } + ], + "chapter": [ + { + "href": "https://wtcs.pressbooks.pub/communications/wp-json/pressbooks/v2/chapters/5" + } + ] + } +} \ No newline at end of file diff --git a/tests/document_collector_hub/resources/pb_chapters.json b/tests/document_collector_hub/resources/pb_chapters.json new file mode 100644 index 0000000..f82e5fc --- /dev/null +++ b/tests/document_collector_hub/resources/pb_chapters.json @@ -0,0 +1,128 @@ +[ + { + "id": 5, + "date": "2025-04-24T14:24:25", + "date_gmt": "2025-04-24T14:24:25", + "guid": { + "rendered": "https://wtcs.pressbooks.pub/communications/?p=5" + }, + "modified": "2025-06-19T17:32:04", + "modified_gmt": "2025-06-19T17:32:04", + "slug": "chapter-1", + "status": "publish", + "type": "chapter", + "link": "https://wtcs.pressbooks.pub/communications/chapter/chapter-1/", + "title": { + "raw": "Chapter 1: Introduction to Communication Situations", + "rendered": "Chapter 1: Introduction to Communication Situations" + }, + "content": { + "raw": "

Chapter 1: Introduction to Communication Situations

\r\n

Competency: Analyze Communication Situations

\r\n
\r\n

Learning Objectives

\r\n
\r\n
\r\n
    \r\n \t
  • Explain how the elements of a communication model apply to real-life situations
  • \r\n \t
  • Identify the responsibilities of participants in the communication process
  • \r\n \t
  • Recognize the factors that impact communication situations
  • \r\n \t
  • Analyze the influence of technology on modern communication
  • \r\n
\r\n
\r\n
\r\n

Communication is the foundation of human interaction, shaping how we connect, collaborate, and coexist in personal, professional, and academic settings. Whether it's a face-to-face conversation, a text message, or a virtual meeting, understanding the dynamics of communication is essential for fostering meaningful and effective interactions. This chapter provides a comprehensive framework for analyzing communication situations, exploring the key elements of communication models, the responsibilities of participants, and the factors that influence how messages are sent, received, and interpreted.

\r\n\r\n

A Short Story: The Email That Went Wrong

\r\n

Sarah, a project manager, sent an urgent email to her team: \"The deadline has been moved to Friday. Please adjust your schedules accordingly.\" Confident her message was clear, she hit send and moved on to her next task. However, one team member, John, read the email while rushing to a meeting and misinterpreted it, thinking the deadline had been extended to next Friday. He didn’t ask for clarification, assuming he understood correctly. Meanwhile, Maria, another team member, missed the email entirely because her inbox was flooded with messages.

\r\n

By Friday, Sarah was shocked to find that John hadn’t even started his part of the project, and Maria was unaware of the new deadline. The project fell behind, and Sarah realized her communication was not as effective as she thought. What went wrong? Was it the channel she chose? The lack of feedback? Or the noise in the communication process?

\r\n

This scenario highlights how easily communication can break down, even with the best intentions. In this chapter, we will explore the key elements of communication, responsibilities of senders and receivers, and factors that can impact communication situations. By the end, you will have the tools to analyze and improve your own communication skills, ensuring that your messages are not just sent, but also understood.

\r\n\r\n

1.1 Applying Communication Models: Understanding How the Pieces Fit

\r\nCommunication is a complex process that involves more than just the exchange of words (Devito, 2018). To understand how communication works, scholars have developed three models that break down the process into its essential components: transmission (also known as linear), interactive, and transactional models of communication. These models provide a framework for analyzing how messages are created, transmitted, received, and interpreted (Lucas & Stob, 2020). By examining elements like the sender, message, channel, receiver, feedback, noise, and context, we can better understand the dynamics of communication in real-life situations (Zarefsky & Engels, 2021). This section explores how each model uses key elements to explain how communication occurs.\r\n

Components Of Communication Models

\r\n
    \r\n \t
  1. Sender:
  2. \r\n
\r\n
    \r\n \t
  • \r\n
      \r\n \t
    • Explanation: The sender is the originator of the message. This role involves not just speaking or writing, but also encoding the message—translating thoughts, emotions, and ideas into a form suitable for transmission. The sender's effectiveness depends on their ability to articulate the message clearly, consider the receiver's perspective, and choose an appropriate channel.
    • \r\n \t
    • Examples:\r\n
        \r\n \t
      • A teacher (sender) explaining a complex scientific concept to students.
      • \r\n \t
      • A company CEO (sender) delivering a quarterly earnings report to shareholders.
      • \r\n \t
      • A friend (sender) texting an invitation to a party.
      • \r\n \t
      • A painter (sender) expressing emotions through their artwork.
      • \r\n
      \r\n
    • \r\n \t
    • Key Considerations: The sender's credibility, knowledge, and communication skills significantly impact how the message is received.
    • \r\n
    \r\n
  • \r\n
\r\n
    \r\n \t
  1. Message:
  2. \r\n
\r\n
    \r\n \t
  • \r\n
      \r\n \t
    • Explanation: The message is the core content being conveyed. It can be verbal, nonverbal, or a combination of both. A well-crafted message is clear, concise, and relevant to the receiver. The message's effectiveness depends on its content, structure, and delivery.
    • \r\n \t
    • Examples:\r\n
        \r\n \t
      • A sales pitch (message) outlining the benefits of a product.
      • \r\n \t
      • A love letter (message) expressing deep emotions.
      • \r\n \t
      • A set of instructions (message) for assembling furniture.
      • \r\n \t
      • A musical composition (message) for listening pleasure.
      • \r\n
      \r\n
    • \r\n \t
    • Key Considerations: The message should be tailored to the receiver's understanding and interests.
    • \r\n
    \r\n
  • \r\n
\r\n
    \r\n \t
  1. Channel:
  2. \r\n
\r\n
    \r\n \t
  • \r\n
      \r\n \t
    • Explanation: The channel is the medium through which the message travels. It's the bridge between the sender and the receiver. The choice of channel can significantly impact the message's effectiveness. Different channels have varying strengths and weaknesses.
    • \r\n \t
    • Examples:\r\n
        \r\n \t
      • Face-to-face conversation (channel) for immediate interaction and feedback.
      • \r\n \t
      • Email (channel) for formal written communication.
      • \r\n \t
      • Social media (channel) for reaching a wide audience.
      • \r\n \t
      • Visual aids (channel) like graphs and charts.
      • \r\n
      \r\n
    • \r\n \t
    • Key Considerations: Factors like message complexity, time sensitivity, and audience preferences influence channel selection. Additionally, the channel can be shifted in the middle of an exchange. An example of this is when you begin texting with someone and a message is exchanged that triggers the receiver to place a Facetime or video call. They felt that the intimacy or intensity of the message required a richer channel for communication.
    • \r\n
    \r\n
  • \r\n
\r\n
    \r\n \t
  1. Receiver:
  2. \r\n
\r\n
    \r\n \t
  • \r\n
      \r\n \t
    • Explanation: The receiver is the target of the message. This role involves decoding the message—interpreting the meaning based on one’s own experiences, knowledge, and cultural background. Effective receivers are active listeners, paying attention to both verbal and nonverbal cues.
    • \r\n \t
    • Examples:\r\n
        \r\n \t
      • A customer (receiver) reading a product review.
      • \r\n \t
      • A student (receiver) listening to a lecture.
      • \r\n \t
      • A friend (receiver) reading a text message.
      • \r\n \t
      • An audience (receiver) watching a play.
      • \r\n
      \r\n
    • \r\n \t
    • Key Considerations: The receiver's ability to understand the message is influenced by their attention, comprehension, and cultural context.
    • \r\n
    \r\n
  • \r\n
\r\n
    \r\n \t
  1. Feedback:
  2. \r\n
\r\n
    \r\n \t
  • \r\n
      \r\n \t
    • Explanation: Feedback is the receiver's response to the message, indicating whether it was understood and how it was received. It completes the communication loop, allowing the sender to adjust their message if necessary. Feedback can be verbal, nonverbal, or both.
    • \r\n \t
    • Examples:\r\n
        \r\n \t
      • Asking clarifying questions (feedback) after a presentation.
      • \r\n \t
      • Nodding or smiling (feedback) during a conversation.
      • \r\n \t
      • Writing a response email (feedback) to a query.
      • \r\n \t
      • A round of applause (feedback) to agree with a message on stage.
      • \r\n
      \r\n
    • \r\n \t
    • Key Considerations: Feedback is crucial for ensuring mutual understanding and effective communication.
    • \r\n
    \r\n
  • \r\n
\r\n
    \r\n \t
  1. Noise:
  2. \r\n
\r\n
    \r\n \t
  • \r\n
      \r\n \t
    • Explanation: Noise is any interference that disrupts or distorts the message, preventing it from being accurately received. It can be physical, psychological, physiological, or semantic.
    • \r\n \t
    • Examples:\r\n
        \r\n \t
      • Background noise (physical noise) during a phone call.
      • \r\n \t
      • Prejudice or biases (psychological noise) affecting interpretation.
      • \r\n \t
      • Jargon or technical terms (semantic noise) that are unfamiliar to the receiver.
      • \r\n \t
      • Headache (physiological noise) while sitting in class.
      • \r\n
      \r\n
    • \r\n \t
    • Key Considerations: Minimizing noise is essential for clear and effective communication.
    • \r\n
    \r\n
  • \r\n
\r\n
    \r\n \t
  1. Context:
  2. \r\n
\r\n
    \r\n \t
  • \r\n
      \r\n \t
    • Explanation: Context refers to the environment or situation in which communication takes place. It includes physical, social, cultural, and historical factors that influence the meaning of the message.
    • \r\n \t
    • Examples:\r\n
        \r\n \t
      • A speech to a large audience (physical context) requiring the use of a microphone.
      • \r\n \t
      • A formal business meeting (social context) requiring professional language.
      • \r\n \t
      • A religious celebration (cultural context) shaping the meaning of symbols and gestures.
      • \r\n \t
      • A reunion (historical context) letting people recall their shared past.
      • \r\n
      \r\n
    • \r\n \t
    • Key Considerations: Understanding the context is crucial for interpreting the message accurately.
    • \r\n
    \r\n
  • \r\n
\r\n

The Linear Model of Communication

\r\nThe linear model of communication depicts communication as a one-way process, where a sender transmits a message to a receiver, with no feedback from the receiver. This model is straightforward, focusing on the transmission of information.  It uses a straight-line analogy, implying that communication is one way. In it, the sender crafts the messages and sends it, along a straight line, to the end point which is where the receiver receives the message. It interprets sending and receiving as two separate and disconnected processes.\r\n\r\nIt includes key components like the sender, who encodes the message; the channel, which carries the message; and the receiver, who decodes it. A significant element within this model is the concept of \"noise,\" which represents any interference that can disrupt the message's clarity. While simple, the linear model is often criticized for its lack of feedback from the receiver, failing to capture the dynamic and interactive nature of most human communication. However, it remains useful for understanding basic communication processes, particularly in scenarios like mass communication, where direct feedback is limited.\r\n
\r\n

Example

\r\n
\r\n
\r\n\r\nA public service announcement on the radio warns listeners about an impending severe weather alert. The message, carefully crafted by the National Weather Service, is broadcast through radio waves to a large audience.  In this scenario, the National Weather Service is the sender, the weather alert is the message, the radio waves are the channel, and the listeners are the receivers. The listeners hear the message and, ideally, take appropriate action, such as seeking shelter. However, in this linear model, there's no direct feedback from the listeners to the weather service.  The message is simply transmitted, with the assumption that it's received and understood. Any potential misunderstandings or questions the listeners might have aren't addressed within this one-way communication process.\"Infographic\r\n\r\n
\r\n
\r\n

Interactive Model of Communication

\r\nThe interactive model of communication builds upon the linear model by introducing the crucial element of feedback, transforming communication into a two-way process. In this model, both the sender and receiver actively participate, with the receiver providing feedback to the sender, indicating understanding or misunderstanding. This feedback loop allows for a more dynamic exchange, as messages can be adjusted and clarified in real-time. Additionally, the interactive model acknowledges the presence of \"fields of experience,\" recognizing that individuals bring unique backgrounds, cultures, and experiences to the communication process, which influence how messages are encoded and decoded. While it still portrays communication as a sequential exchange of messages, the interactive model provides a more realistic representation of how people communicate in conversations and discussions, highlighting the importance of mutual understanding and responsiveness.\r\n\r\n \r\n
\r\n

Example

\r\n
\r\n
\r\n\r\nImagine two friends, Alex and Jordan, discussing plans for the weekend. Alex suggests, \"Hey, how about we check out that new art exhibit downtown?\" Jordan, looking a bit hesitant, replies, \"Hmm, I'm not really feeling an art exhibit. I was thinking maybe something more active, like a hike?\" Alex notices Jordan's body language and tone and asks, \"Oh, okay. Is there something specific you're in the mood for?\" Jordan responds, \"Yeah, I've been cooped up all week, so I need to get some fresh air and move around.\" Alex then says, \"Got it! A hike sounds great. We could go to that trail near the lake, and maybe grab some food afterwards?\" Jordan smiles and says, \"Perfect! That sounds like a plan.\" In this scenario, Alex and Jordan are constantly exchanging messages and feedback. Alex's initial suggestion is met with Jordan's nonverbal and verbal cues, prompting Alex to adjust their suggestion. Jordan's explanation of their needs further shapes the conversation, and Alex's revised plan leads to a mutually agreeable outcome. Their \"fields of experience\" – Alex's interest in art and Jordan's need for activity – influence their initial preferences, but the interactive nature of their conversation allows them to find a solution that satisfies both.\"Infographic\r\n\r\n
\r\n
\r\n

The Transactional Model of Communication

\r\nThe transactional model of communication presents a more complex and nuanced understanding of how we communicate. Unlike the linear and interactive models, it doesn't view communication as a sequential process with distinct senders and receivers. Instead, it emphasizes that communication is a simultaneous and ongoing process where participants are both senders and receivers at the same time. This model highlights that communication is relational, meaning that it shapes and is shaped by the relationship between the communicators. It also stresses the importance of context, recognizing that communication occurs within specific social, cultural, historical, and relational contexts that influence the meaning of messages. The transactional model acknowledges that communication is not just about exchanging information, but also about creating shared meaning and understanding through a dynamic and continuous exchange of verbal and nonverbal cues. It reflects the idea that communication is a complex, ever-evolving process that is integral to our social interactions.\r\n
\r\n

Example

\r\n
\r\n
\r\n\r\nIn a high school social studies class, students are discussing a recent news article about climate change. The teacher, Ms. Evans, initiates the discussion by asking, 'What are your thoughts on the article's proposed solutions?'\r\n\r\n
\r\n
    \r\n \t
  • Simultaneous Sending And Receiving:\r\n
      \r\n \t
    • As Ms. Evans poses the question, she's simultaneously observing the students' body language – their facial expressions, posture, and eye contact – to gauge their initial reactions.
    • \r\n \t
    • Bonita raises their hand and begins to speak, expressing concern about the economic impact of the proposed solutions. While speaking, they are also monitoring the reactions of their classmates and Ms. Evans.
    • \r\n \t
    • Juan, while listening to Bonita, is formulating their own response, nodding to show agreement with some points and frowning at others.
    • \r\n \t
    • Veronica is looking up information on her laptop, and showing the screen to the others to illustrate their point.
    • \r\n
    \r\n
  • \r\n \t
  • Relational And Contextual Influence:\r\n
      \r\n \t
    • The classroom environment, with its established norms of respectful discourse, shapes how students communicate.
    • \r\n \t
    • The students' pre-existing relationships with each other and with Ms. Evans influence their interactions.
    • \r\n \t
    • The social and cultural context of the climate change debate, with its diverse perspectives and emotional weight, adds another layer of complexity to the communication.
    • \r\n \t
    • The use of the laptops, and the sharing of information, changes the context of the conversation.
    • \r\n
    \r\n
  • \r\n \t
  • Dynamic And Continuous Exchange:\r\n
      \r\n \t
    • The discussion evolves organically, with students building on each other's ideas and challenging each other's assumptions.
    • \r\n \t
    • Ms. Evans facilitates the conversation, providing feedback, asking clarifying questions, and introducing new perspectives.
    • \r\n \t
    • Nonverbal cues, such as tone of voice, facial expressions, and gestures, play a significant role in conveying meaning.
    • \r\n \t
    • The students are constantly adapting their messages based on the ongoing feedback they receive.
    • \r\n
    \r\n
  • \r\n \t
  • Shared Meaning Creation:\r\n
      \r\n \t
    • Through the dynamic exchange, the students and Ms. Evans are collectively constructing a shared understanding of the complex issue.
    • \r\n \t
    • The discussion is not just about exchanging information; it's about exploring different perspectives, challenging assumptions, and developing critical thinking skills.
    • \r\n \t
    • The use of shared digital information, helps to create a shared meaning.
    • \r\n
    \r\n
  • \r\n
\r\nIn this classroom scenario, the transactional model is evident. Everyone is simultaneously sending and receiving messages, and the communication is shaped by the relational and contextual factors at play. The process is continuous, dynamic, and focused on creating shared meaning.\"Infographic\r\n\r\n \r\n\r\n
\r\n

Wrap Up Questions

\r\n
    \r\n \t
  1. Think about a recent miscommunication you experienced, either in person or digitally. Using the concepts of sender, message, channel, receiver, feedback, noise, and context, which specific components do you think contributed most to the breakdown? How might understanding these elements have helped prevent or resolve the issue?
  2. \r\n \t
  3. Consider the three communication models (linear, interactive, and transactional). Can you identify a situation where the linear model (one-way, no feedback) is the most appropriate or common, and another where only the transactional model (simultaneous sending/receiving, shared context) fully captures the dynamic? What makes one model more fitting for each scenario?
  4. \r\n \t
  5. The text mentions how a shift in channel (e.g., from texting to a Facetime call) can change the intimacy or intensity of a message. Beyond just intimacy, how might the choice of channel (e.g., email vs. face-to-face, video conference vs. phone call) affect the presence and impact of noise (like semantic noise or psychological noise) in a professional setting?
  6. \r\n
\r\n

1.2 Communication Responsibilities: The Roles of Senders and Receivers

\r\nEffective communication is a two-way street that requires active participation from both senders and receivers (O’Hair et al., 2023). While the sender is responsible for encoding and delivering a clear message, the receiver plays an equally important role in decoding the message and providing feedback. Each participant has specific responsibilities that contribute to the success of the communication process. This section delves into the roles of senders and receivers, highlighting the importance of clarity, active listening, feedback, and cultural awareness. By understanding and fulfilling these responsibilities, individuals can ensure that their messages are not only sent but also understood and acted upon.\r\n

Responsibilities Of the Sender

\r\n
    \r\n \t
  • Using Clarity and Precision: Use clear, concise language appropriate for the receiver and context. For example, a doctor explaining a diagnosis to a patient should avoid medical jargon and use simple terms (Allen et al., 2023). Improving clarity and precision are strategic choices that a sender can make to increase understanding.
  • \r\n \t
  • Choosing The Right Channel: Select the most effective medium for the message. A sensitive conversation between a supervisor and employee about performance reviews might be better suited for a face-to-face meeting rather than an email (Wrench et al., 2020). Selecting the channel that is more suitable for the communicative exchange requires the sender to discern how the channel will alter the message. Phone calls, texts, or face-to-face meetings all have situations that they are best suited for as channels.
  • \r\n \t
  • Anticipating Noise: Identify potential noise barriers (e.g., distractions, cultural differences) and address them proactively. For instance, a presenter might use a microphone in a noisy room to ensure their message is heard. Being able to empathize with the receiver and understand how noise can distract from meaning is the responsibility of the sender.
  • \r\n \t
  • Encouraging Feedback: Actively seek feedback to ensure the message was understood. A manager might ask, “Does that make sense?” or “Do you have any questions?” Asking clarifying questions encourages symmetry of meaning during communicative exchanges and is typically a responsibility of a thoughtful sender.
  • \r\n
\r\n

Responsibilities Of the Receiver

\r\n
    \r\n \t
  • Demonstrating Active Listening: Pay full attention to the sender and show engagement through nonverbal cues like nodding or maintaining eye contact (Wrench et al., 2020). Active listening displays regard for the topic and/or the speaker and is often perceived positively. Expending the effort to listen actively is the responsibility of the receiver.
  • \r\n \t
  • Providing Feedback and Clarify Misunderstandings: Respond to the sender to confirm understanding or request clarification. For example, a student might say, “I understand the first step, but could you explain the second step again?” Similar to encouraging feedback from the sender’s perspective, providing feedback is the receiver’s opportunity to promote clarity within communication.
  • \r\n \t
  • Being Aware of Bias: Recognize personal biases that might affect interpretation. For instance, a receiver with a negative bias toward the sender might misinterpret a neutral message as hostile (Wrench et al., 2020). An example of this is trying to be fair and even-tempered with someone who holds oppositional political beliefs from your own.
  • \r\n
\r\n
\r\n

Example

\r\n
\r\n
\r\n\r\nDuring a crucial team briefing, Brin, the project manager, demonstrated exemplary sender responsibilities as she introduced the new software implementation. Recognizing the team's diverse technical backgrounds, she consciously avoided jargon, opting for clear, concise language to explain the system's benefits, such as simplifying data sharing. Aware of the potential anxieties surrounding workflow changes, she chose a face-to-face meeting, fostering direct interaction and immediate clarification, and ensured a distraction-free environment. Proactively addressing potential noise, she acknowledged their concerns about workload impact and emphasized the long-term advantages. Throughout the briefing, Brin actively solicited feedback, pausing to ask, \"Does this make sense?\" and \"What questions do you have?\" and scheduled follow up one-on-one meetings.\r\n\r\nOn the receiving end, the team members, including John, Maria, and Easton, showcased their receiver responsibilities. They practiced active listening by maintaining eye contact, and minimizing distractions. John sought clarification on the data migration process, while Maria inquired about training, demonstrating their commitment to understanding. Easton, mindful of his past negative experiences with software implementations, consciously mitigated his bias, focusing on Brin's explanations and the facts presented. The collaborative dynamic between Brin and her team, marked by clear communication and active engagement, resulted in a productive briefing, leaving the team well-informed and positively oriented towards the upcoming software transition.\r\n\r\n
\r\n
\r\n

Wrap Up Questions

\r\n
    \r\n \t
  1. The text highlights the sender's responsibility in anticipating noise. Beyond external distractions, how can a sender anticipate and proactively address internal forms of noise, such as a receiver's psychological biases or semantic noise (e.g., jargon) when preparing an important message?
  2. \r\n \t
  3. The section emphasizes that active listening is a key responsibility of the receiver. In what ways can a receiver nonverbally demonstrate active listening in a virtual meeting (e.g., via video conference) compared to a face-to-face conversation? What challenges might virtual environments pose for effective active listening?
  4. \r\n \t
  5. Both senders and receivers have responsibilities regarding feedback. Describe a scenario where a lack of proper feedback from the receiver led to a significant problem, and then explain how the sender's responsibility to encourage feedback, combined with the receiver's responsibility to provide feedback, could have prevented that outcome.
  6. \r\n
\r\n

1.3 Identifying Elements That Impact Communication

\r\nCommunication does not occur in a vacuum; it is influenced by a variety of factors that shape how messages are sent, received, and interpreted (Munz et al., 2024). These factors include the setting in which communication takes place, cultural norms, personal perceptions, emotional states, and environmental conditions (Seiler et al., 2021). For example, a message delivered in a noisy environment may be misunderstood, while cultural differences can lead to misinterpretation of nonverbal cues. This section explores these elements in detail, providing a deeper understanding of how they impact communication. By recognizing and addressing these factors, individuals can adapt their communication strategies to enhance clarity and effectiveness in diverse situations.\r\n

Key Factors Influencing Communication

\r\n
    \r\n \t
  • Context: The setting (physical, social, cultural, or historical) shapes how messages are sent and received. For example, a job interview requires formal communication, while a casual chat with friends allows for informal language. Selecting communication that is appropriate for the situation, message, and intended meaning of communication is a key factor influencing how messages are received.
  • \r\n \t
  • Culture: Cultural norms influence communication styles, nonverbal cues, and interpretations. In some cultures, direct eye contact is seen as respectful, while in others, it may be considered confrontational (Ting-Toomey & Chung, 2012). Understanding cultural differences and how nonverbal cues change based on culture can empower a communicator to more easily convey their intended message.
  • \r\n \t
  • Perception: Personal experiences and biases affect how messages are decoded. A receiver who has had negative experiences with authority figures might interpret a manager’s feedback as criticism. Understanding how your perception affects your view of a situation gives you the ability to approach complicated situations from diverse perspectives.
  • \r\n \t
  • Emotions: Emotional states can enhance or hinder communication effectiveness. A person who is angry or stressed might struggle to listen actively or respond calmly. Managing our emotional reactions while communicating can allow us greater ability to respond thoughtfully rather than letting our emotions cause us to say something we don’t mean in a reactive moment.
  • \r\n \t
  • Environment: Physical conditions (e.g., noise, lighting) and technological tools impact communication clarity. A poorly lit room or a shaky internet connection can disrupt communication. Anticipating how the environment can influence communication can allow you to have strategies in place to circumvent the shortcomings of environmental disruptions.
  • \r\n
\r\n
\r\n

Example: Cross-Cultural Communication

\r\n
\r\n
\r\n\r\nScenario: An American businessperson negotiates a deal with a Japanese counterpart.\r\n
    \r\n \t
  • Cultural Context: The American prefers direct communication, while the Japanese counterpart values indirect communication and harmony (Ting-Toomey & Chung, 2012). These opposing cultural dynamics require both sides to be able to perceive how their differences affect their communication and recognize adaptive strategies that allow compromise to work toward success.
  • \r\n \t
  • Perception: The American might interpret the Japanese counterpart’s silence as disinterest, while the Japanese counterpart might view the American’s directness as rude (Wrench et al., 2020). Applying responsibilities described in section 1.2, both sides must be willing to check their perceptions by asking for and encouraging feedback to find commonalities and avoid inaccurate judgments.
  • \r\n \t
  • Emotions: Both parties must manage their emotions to maintain a respectful and productive dialogue. By focusing on the messages being sent and not the feelings that those messages provoke, the two sides will be better able to manage their culturally diverse perspectives.
  • \r\n
\r\nBy understanding these factors, individuals can adapt their communication strategies to bridge cultural gaps and foster mutual understanding.\r\n\r\n
\r\n
\r\n

Wrap Up Questions

\r\n
    \r\n \t
  1. The section emphasizes how context shapes communication. Describe a specific professional scenario where failing to adapt your communication to the physical or social context (e.g., a casual hallway conversation versus a formal boardroom meeting) could lead to significant negative consequences. What specific communication elements (verbal, nonverbal, channel) would you need to adjust?
  2. \r\n \t
  3. Perception and emotions are identified as internal factors influencing communication. Think about a time when your own emotional state or a preconceived perception affected how you received or sent a message. How might active strategies, like those discussed in previous sections (e.g., seeking clarification, being aware of bias), help to mitigate the negative impact of these internal factors?
  4. \r\n \t
  5. Beyond cultural differences, how might environmental noise (physical distractions) or technological limitations (a type of environmental impact) disproportionately affect communication for individuals with certain physiological conditions (e.g., hearing impairment, visual impairment)? What responsibilities do senders and receivers have in these situations to ensure effective communication?
  6. \r\n
\r\n

1.4 The Impact of Technology on Communication

\r\nTechnology has revolutionized the way we communicate, offering new opportunities and challenges. Digital tools like email, social media, and video calling have made it easier to connect with others across the globe, but they also introduce complexities such as digital misinterpretation, information overload, and privacy concerns. This section examines how technology has transformed communication, exploring both its benefits and drawbacks. By understanding the impact of technology on communication, individuals can leverage digital tools effectively while mitigating potential challenges, ensuring that their messages are clear, secure, and impactful in an increasingly connected world.\r\n

How Technology Transforms Communication and Creates New Challenges

\r\n
    \r\n \t
  • Digital Channels: Email, text messaging, and video calling enable instant, global communication but can lack nonverbal cues. Text-based communication can lead to misinterpretation of tone and intent. For example, a text message might be misinterpreted without tone or facial expressions (Bobkina et al., 2023). Digital communication can be fast and efficient, but it is a lean channel and some of our methods for making shared meanings are lost in translation.
  • \r\n \t
  • Social Media: Platforms like Instagram and Facebook facilitate networking and information-sharing but can lead to information overload and privacy concerns. A post might go viral, spreading misinformation rapidly (Dizikes, 2018). Understanding how algorithms and information replication work across social media platforms will enable you to make informed choices about how to use a given social media platform.
  • \r\n \t
  • Remote Communication: Tools like Zoom and Teams support remote work and collaboration but can cause digital fatigue and miscommunication. A team member might feel the unintended consequences of technology-related stress and anxiety (Marsh et al., 2022). Constant notifications and messages can overwhelm users, leading to stress and decreased productivity. The constant evolution of workspaces and technology that potentiates working from home also carries with it the transformation of personal and professional decorum within new aspects of our lives.
  • \r\n
\r\n

Strategies for Effective Digital Communication

\r\n
    \r\n \t
  • Practicing Digital Etiquette: Use appropriate tone, language, and response times for different platforms. For example, professional emails should maintain a formal tone, while direct messages can be more casual (Baym, 2015). Digital channels and social media platforms have different expectational norms than traditional communication forums.
  • \r\n \t
  • Enhancing Media Literacy: Develop the ability to critically assess online content and differentiate between credible sources and misinformation (Lee, 2014). Media literacy provides a methodology to analyze media messages and react appropriately.
  • \r\n \t
  • Balancing Online and Offline Communication: Maintain face-to-face interactions to build deeper relationships and reduce digital fatigue (Duradoni, 2024). Recognizing that the social self is constructed both online and offline can give people greater perspective in understanding their social connections.
  • \r\n \t
  • Utilizing Security Measures: Protect personal and professional information by using strong passwords, enabling two-factor authentication, and avoiding public Wi-Fi for sensitive transactions (Baym, 2015). By being aware of and responsive to increased security risks in digital communication, informed users can make choices to be preventative and proactive.
  • \r\n
\r\n

Wrap Up Questions

\r\n
    \r\n \t
  1. The section notes that digital channels can lack nonverbal cues, leading to misinterpretation. Think about a professional situation where you relied solely on text-based communication (email, text message, chat) and experienced a misunderstanding. How might you have used strategies for effective digital communication (e.g., practicing digital etiquette, balancing online/offline) to prevent that misinterpretation, or what could you do differently next time?
  2. \r\n \t
  3. Remote communication tools like Zoom and Teams offer benefits but also introduce challenges like digital fatigue. Considering your own experiences, what specific communication behaviors or practices (from either the sender or receiver's side, as discussed in previous sections) can help mitigate digital fatigue and miscommunication in virtual professional settings?
  4. \r\n \t
  5. The concept of information overload is mentioned in relation to social media. Beyond just social media, how might the constant influx of digital messages across various channels (email, chat, project management tools) impact an individual's ability to engage in active listening during important conversations or focus on complex tasks? What strategies could help manage this?
  6. \r\n
\r\n

Key Takeaways

\r\n
    \r\n \t
  • Communication is a dynamic process influenced by elements like sender, message, channel, receiver, feedback, noise, and context.
  • \r\n \t
  • Both senders and receivers have responsibilities to ensure effective communication. Senders must encode clear messages and choose appropriate channels, while receivers must actively listen, decode information, and provide feedback.
  • \r\n \t
  • Factors such as context, culture, perception, emotions, and environment shape communication outcomes. Understanding these factors helps individuals adapt their communication strategies.
  • \r\n \t
  • Technology has revolutionized communication but introduces challenges like misinterpretation and information overload. Practicing digital etiquette and enhancing media literacy are essential for effective digital communication.
  • \r\n
\r\n

Chapter Summary

\r\nIn this chapter, we explored the fundamental elements of communication, including three models of communication, the responsibilities of senders and receivers, and the factors that influence communication outcomes. We also examined how technology has transformed communication, offering both opportunities and challenges. By understanding these concepts, you can analyze and improve your communication skills, ensuring clarity and effectiveness in every interaction.\r\n

Learning Activities

\r\n
\r\n\r\n[h5p id=\"1\"]\r\n\r\n
\r\n
\r\n\r\n[h5p id=\"2\"]\r\n\r\n
\r\n
\r\n\r\n[h5p id=\"3\"]\r\n\r\n
\r\n

References

\r\nAllen, K. A., Charpentier, V., Hendrickson, M. A., Kessler, M., Gotlieb, R., Marmet, J., Hause, E., Praska, C., Lunos, S., & Pitt, M. B. (2023). Jargon be gone - Patient preference in doctor communication. Journal of Patient Experience, 10. https://doi.org/10.1177/23743735231158942\r\n\r\nBaym, N. K. (2015). Personal connections in the digital age. Polity Press.\r\n\r\nBobkina, J., Domínguez Romero, E., & Gómez Ortiz, M. J. (2023). Kinesic communication in traditional and digital contexts: An exploratory study of ESP undergraduate students. System, 115, 103034. https://doi.org/10.1016/j.system.2023.103034\r\n\r\nDeVito, J. A. (2018). Human communication: The basic course. Pearson.\r\n\r\nDizikes, P. (2018). Study: On Twitter, false news travels faster than true stories. MIT News Office. https://news.mit.edu/2018/study-twitter-false-news-travels-faster-true-stories-0308\r\n\r\nDuradoni, M., Severino, F. P., Bellotti, M., & Guazzini, A. (2024). How mattering and anti-mattering experiences across offline and online environments contribute to people's digital life balance and social media addiction. Journal of Community and Applied Social Psychology, 34(e70008). https://doi.org/10.1002/casp.70008\r\n\r\nLee, S. H. (2014). Digital literacy education for the development of digital literacy. International Journal of Digital Literacy and Digital Competence, 5(3), 29-43. https://doi.org/10.4018/ijdldc.2014070103\r\n\r\nLucas, S. E., & Stob, P. (2020). The art of public speaking. McGraw-Hill.\r\n\r\nMarsh, E., Vallejos, E. P., & Spence, A. (2022). The digital workplace and its dark side: An integrative review. Computers in Human Behavior, 128. https://doi.org/10.1016/j.chb.2021.107118\r\n\r\nMunz, S. M., McKenna-Buchanan, T., & Wright, A. M. (Eds.). (2024). The Routledge handbook of public speaking research and theory. Routledge.\r\n\r\nO’Hair, D., Rubenstein, H., & Stewart, R. (2023). A pocket guide to public speaking. Macmillan.\r\n\r\nSeiler, W., Beall, M., & Mazer, J. (2021). Communication: Making connections. Pearson.\r\n\r\nTing-Toomey, S., & Chung, L. C. (2012). Understanding intercultural communication. Oxford University Press.\r\n\r\nWrench, J. S., Punyanunt-Carter, N. M., & Thweatt, K. S. (2020). Interpersonal communication: A mindful approach to relationships. Milne Open Textbooks. https://open.umn.edu/opentextbooks/textbooks/906\r\n\r\nZarefsky, D., & Engels, J. D. (2021). Public speaking: Strategies for success. Pearson.\r\n

Images:

\r\nAll images on this page:\r\n\r\nOpenAI. (2025). ChatGPT. (April 28 version) [Large language model]. https://chatgpt.com/\r\n\r\n ", + "rendered": "

Chapter 1: Introduction to Communication Situations

\n

Competency: Analyze Communication Situations

\n
\n
\n

Learning Objectives

\n
\n
\n
    \n
  • Explain how the elements of a communication model apply to real-life situations
  • \n
  • Identify the responsibilities of participants in the communication process
  • \n
  • Recognize the factors that impact communication situations
  • \n
  • Analyze the influence of technology on modern communication
  • \n
\n
\n
\n

Communication is the foundation of human interaction, shaping how we connect, collaborate, and coexist in personal, professional, and academic settings. Whether it’s a face-to-face conversation, a text message, or a virtual meeting, understanding the dynamics of communication is essential for fostering meaningful and effective interactions. This chapter provides a comprehensive framework for analyzing communication situations, exploring the key elements of communication models, the responsibilities of participants, and the factors that influence how messages are sent, received, and interpreted.

\n

A Short Story: The Email That Went Wrong

\n

Sarah, a project manager, sent an urgent email to her team: “The deadline has been moved to Friday. Please adjust your schedules accordingly.” Confident her message was clear, she hit send and moved on to her next task. However, one team member, John, read the email while rushing to a meeting and misinterpreted it, thinking the deadline had been extended to next Friday. He didn’t ask for clarification, assuming he understood correctly. Meanwhile, Maria, another team member, missed the email entirely because her inbox was flooded with messages.

\n

By Friday, Sarah was shocked to find that John hadn’t even started his part of the project, and Maria was unaware of the new deadline. The project fell behind, and Sarah realized her communication was not as effective as she thought. What went wrong? Was it the channel she chose? The lack of feedback? Or the noise in the communication process?

\n

This scenario highlights how easily communication can break down, even with the best intentions. In this chapter, we will explore the key elements of communication, responsibilities of senders and receivers, and factors that can impact communication situations. By the end, you will have the tools to analyze and improve your own communication skills, ensuring that your messages are not just sent, but also understood.

\n

1.1 Applying Communication Models: Understanding How the Pieces Fit

\n

Communication is a complex process that involves more than just the exchange of words (Devito, 2018). To understand how communication works, scholars have developed three models that break down the process into its essential components: transmission (also known as linear), interactive, and transactional models of communication. These models provide a framework for analyzing how messages are created, transmitted, received, and interpreted (Lucas & Stob, 2020). By examining elements like the sender, message, channel, receiver, feedback, noise, and context, we can better understand the dynamics of communication in real-life situations (Zarefsky & Engels, 2021). This section explores how each model uses key elements to explain how communication occurs.

\n

Components Of Communication Models

\n
    \n
  1. Sender:
  2. \n
\n
    \n
  • \n
      \n
    • Explanation: The sender is the originator of the message. This role involves not just speaking or writing, but also encoding the message—translating thoughts, emotions, and ideas into a form suitable for transmission. The sender’s effectiveness depends on their ability to articulate the message clearly, consider the receiver’s perspective, and choose an appropriate channel.
    • \n
    • Examples:\n
        \n
      • A teacher (sender) explaining a complex scientific concept to students.
      • \n
      • A company CEO (sender) delivering a quarterly earnings report to shareholders.
      • \n
      • A friend (sender) texting an invitation to a party.
      • \n
      • A painter (sender) expressing emotions through their artwork.
      • \n
      \n
    • \n
    • Key Considerations: The sender’s credibility, knowledge, and communication skills significantly impact how the message is received.
    • \n
    \n
  • \n
\n
    \n
  1. Message:
  2. \n
\n
    \n
  • \n
      \n
    • Explanation: The message is the core content being conveyed. It can be verbal, nonverbal, or a combination of both. A well-crafted message is clear, concise, and relevant to the receiver. The message’s effectiveness depends on its content, structure, and delivery.
    • \n
    • Examples:\n
        \n
      • A sales pitch (message) outlining the benefits of a product.
      • \n
      • A love letter (message) expressing deep emotions.
      • \n
      • A set of instructions (message) for assembling furniture.
      • \n
      • A musical composition (message) for listening pleasure.
      • \n
      \n
    • \n
    • Key Considerations: The message should be tailored to the receiver’s understanding and interests.
    • \n
    \n
  • \n
\n
    \n
  1. Channel:
  2. \n
\n
    \n
  • \n
      \n
    • Explanation: The channel is the medium through which the message travels. It’s the bridge between the sender and the receiver. The choice of channel can significantly impact the message’s effectiveness. Different channels have varying strengths and weaknesses.
    • \n
    • Examples:\n
        \n
      • Face-to-face conversation (channel) for immediate interaction and feedback.
      • \n
      • Email (channel) for formal written communication.
      • \n
      • Social media (channel) for reaching a wide audience.
      • \n
      • Visual aids (channel) like graphs and charts.
      • \n
      \n
    • \n
    • Key Considerations: Factors like message complexity, time sensitivity, and audience preferences influence channel selection. Additionally, the channel can be shifted in the middle of an exchange. An example of this is when you begin texting with someone and a message is exchanged that triggers the receiver to place a Facetime or video call. They felt that the intimacy or intensity of the message required a richer channel for communication.
    • \n
    \n
  • \n
\n
    \n
  1. Receiver:
  2. \n
\n
    \n
  • \n
      \n
    • Explanation: The receiver is the target of the message. This role involves decoding the message—interpreting the meaning based on one’s own experiences, knowledge, and cultural background. Effective receivers are active listeners, paying attention to both verbal and nonverbal cues.
    • \n
    • Examples:\n
        \n
      • A customer (receiver) reading a product review.
      • \n
      • A student (receiver) listening to a lecture.
      • \n
      • A friend (receiver) reading a text message.
      • \n
      • An audience (receiver) watching a play.
      • \n
      \n
    • \n
    • Key Considerations: The receiver’s ability to understand the message is influenced by their attention, comprehension, and cultural context.
    • \n
    \n
  • \n
\n
    \n
  1. Feedback:
  2. \n
\n
    \n
  • \n
      \n
    • Explanation: Feedback is the receiver’s response to the message, indicating whether it was understood and how it was received. It completes the communication loop, allowing the sender to adjust their message if necessary. Feedback can be verbal, nonverbal, or both.
    • \n
    • Examples:\n
        \n
      • Asking clarifying questions (feedback) after a presentation.
      • \n
      • Nodding or smiling (feedback) during a conversation.
      • \n
      • Writing a response email (feedback) to a query.
      • \n
      • A round of applause (feedback) to agree with a message on stage.
      • \n
      \n
    • \n
    • Key Considerations: Feedback is crucial for ensuring mutual understanding and effective communication.
    • \n
    \n
  • \n
\n
    \n
  1. Noise:
  2. \n
\n
    \n
  • \n
      \n
    • Explanation: Noise is any interference that disrupts or distorts the message, preventing it from being accurately received. It can be physical, psychological, physiological, or semantic.
    • \n
    • Examples:\n
        \n
      • Background noise (physical noise) during a phone call.
      • \n
      • Prejudice or biases (psychological noise) affecting interpretation.
      • \n
      • Jargon or technical terms (semantic noise) that are unfamiliar to the receiver.
      • \n
      • Headache (physiological noise) while sitting in class.
      • \n
      \n
    • \n
    • Key Considerations: Minimizing noise is essential for clear and effective communication.
    • \n
    \n
  • \n
\n
    \n
  1. Context:
  2. \n
\n
    \n
  • \n
      \n
    • Explanation: Context refers to the environment or situation in which communication takes place. It includes physical, social, cultural, and historical factors that influence the meaning of the message.
    • \n
    • Examples:\n
        \n
      • A speech to a large audience (physical context) requiring the use of a microphone.
      • \n
      • A formal business meeting (social context) requiring professional language.
      • \n
      • A religious celebration (cultural context) shaping the meaning of symbols and gestures.
      • \n
      • A reunion (historical context) letting people recall their shared past.
      • \n
      \n
    • \n
    • Key Considerations: Understanding the context is crucial for interpreting the message accurately.
    • \n
    \n
  • \n
\n

The Linear Model of Communication

\n

The linear model of communication depicts communication as a one-way process, where a sender transmits a message to a receiver, with no feedback from the receiver. This model is straightforward, focusing on the transmission of information.  It uses a straight-line analogy, implying that communication is one way. In it, the sender crafts the messages and sends it, along a straight line, to the end point which is where the receiver receives the message. It interprets sending and receiving as two separate and disconnected processes.

\n

It includes key components like the sender, who encodes the message; the channel, which carries the message; and the receiver, who decodes it. A significant element within this model is the concept of “noise,” which represents any interference that can disrupt the message’s clarity. While simple, the linear model is often criticized for its lack of feedback from the receiver, failing to capture the dynamic and interactive nature of most human communication. However, it remains useful for understanding basic communication processes, particularly in scenarios like mass communication, where direct feedback is limited.

\n
\n
\n

Example

\n
\n
\n

A public service announcement on the radio warns listeners about an impending severe weather alert. The message, carefully crafted by the National Weather Service, is broadcast through radio waves to a large audience.  In this scenario, the National Weather Service is the sender, the weather alert is the message, the radio waves are the channel, and the listeners are the receivers. The listeners hear the message and, ideally, take appropriate action, such as seeking shelter. However, in this linear model, there’s no direct feedback from the listeners to the weather service.  The message is simply transmitted, with the assumption that it’s received and understood. Any potential misunderstandings or questions the listeners might have aren’t addressed within this one-way communication process.\"Infographic

\n
\n
\n

Interactive Model of Communication

\n

The interactive model of communication builds upon the linear model by introducing the crucial element of feedback, transforming communication into a two-way process. In this model, both the sender and receiver actively participate, with the receiver providing feedback to the sender, indicating understanding or misunderstanding. This feedback loop allows for a more dynamic exchange, as messages can be adjusted and clarified in real-time. Additionally, the interactive model acknowledges the presence of “fields of experience,” recognizing that individuals bring unique backgrounds, cultures, and experiences to the communication process, which influence how messages are encoded and decoded. While it still portrays communication as a sequential exchange of messages, the interactive model provides a more realistic representation of how people communicate in conversations and discussions, highlighting the importance of mutual understanding and responsiveness.

\n

 

\n
\n
\n

Example

\n
\n
\n

Imagine two friends, Alex and Jordan, discussing plans for the weekend. Alex suggests, “Hey, how about we check out that new art exhibit downtown?” Jordan, looking a bit hesitant, replies, “Hmm, I’m not really feeling an art exhibit. I was thinking maybe something more active, like a hike?” Alex notices Jordan’s body language and tone and asks, “Oh, okay. Is there something specific you’re in the mood for?” Jordan responds, “Yeah, I’ve been cooped up all week, so I need to get some fresh air and move around.” Alex then says, “Got it! A hike sounds great. We could go to that trail near the lake, and maybe grab some food afterwards?” Jordan smiles and says, “Perfect! That sounds like a plan.” In this scenario, Alex and Jordan are constantly exchanging messages and feedback. Alex’s initial suggestion is met with Jordan’s nonverbal and verbal cues, prompting Alex to adjust their suggestion. Jordan’s explanation of their needs further shapes the conversation, and Alex’s revised plan leads to a mutually agreeable outcome. Their “fields of experience” – Alex’s interest in art and Jordan’s need for activity – influence their initial preferences, but the interactive nature of their conversation allows them to find a solution that satisfies both.\"Infographic

\n
\n
\n

The Transactional Model of Communication

\n

The transactional model of communication presents a more complex and nuanced understanding of how we communicate. Unlike the linear and interactive models, it doesn’t view communication as a sequential process with distinct senders and receivers. Instead, it emphasizes that communication is a simultaneous and ongoing process where participants are both senders and receivers at the same time. This model highlights that communication is relational, meaning that it shapes and is shaped by the relationship between the communicators. It also stresses the importance of context, recognizing that communication occurs within specific social, cultural, historical, and relational contexts that influence the meaning of messages. The transactional model acknowledges that communication is not just about exchanging information, but also about creating shared meaning and understanding through a dynamic and continuous exchange of verbal and nonverbal cues. It reflects the idea that communication is a complex, ever-evolving process that is integral to our social interactions.

\n
\n
\n

Example

\n
\n
\n

In a high school social studies class, students are discussing a recent news article about climate change. The teacher, Ms. Evans, initiates the discussion by asking, ‘What are your thoughts on the article’s proposed solutions?’

\n
\n
    \n
  • Simultaneous Sending And Receiving:\n
      \n
    • As Ms. Evans poses the question, she’s simultaneously observing the students’ body language – their facial expressions, posture, and eye contact – to gauge their initial reactions.
    • \n
    • Bonita raises their hand and begins to speak, expressing concern about the economic impact of the proposed solutions. While speaking, they are also monitoring the reactions of their classmates and Ms. Evans.
    • \n
    • Juan, while listening to Bonita, is formulating their own response, nodding to show agreement with some points and frowning at others.
    • \n
    • Veronica is looking up information on her laptop, and showing the screen to the others to illustrate their point.
    • \n
    \n
  • \n
  • Relational And Contextual Influence:\n
      \n
    • The classroom environment, with its established norms of respectful discourse, shapes how students communicate.
    • \n
    • The students’ pre-existing relationships with each other and with Ms. Evans influence their interactions.
    • \n
    • The social and cultural context of the climate change debate, with its diverse perspectives and emotional weight, adds another layer of complexity to the communication.
    • \n
    • The use of the laptops, and the sharing of information, changes the context of the conversation.
    • \n
    \n
  • \n
  • Dynamic And Continuous Exchange:\n
      \n
    • The discussion evolves organically, with students building on each other’s ideas and challenging each other’s assumptions.
    • \n
    • Ms. Evans facilitates the conversation, providing feedback, asking clarifying questions, and introducing new perspectives.
    • \n
    • Nonverbal cues, such as tone of voice, facial expressions, and gestures, play a significant role in conveying meaning.
    • \n
    • The students are constantly adapting their messages based on the ongoing feedback they receive.
    • \n
    \n
  • \n
  • Shared Meaning Creation:\n
      \n
    • Through the dynamic exchange, the students and Ms. Evans are collectively constructing a shared understanding of the complex issue.
    • \n
    • The discussion is not just about exchanging information; it’s about exploring different perspectives, challenging assumptions, and developing critical thinking skills.
    • \n
    • The use of shared digital information, helps to create a shared meaning.
    • \n
    \n
  • \n
\n

In this classroom scenario, the transactional model is evident. Everyone is simultaneously sending and receiving messages, and the communication is shaped by the relational and contextual factors at play. The process is continuous, dynamic, and focused on creating shared meaning.\"Infographic

\n

 

\n
\n

Wrap Up Questions

\n
    \n
  1. Think about a recent miscommunication you experienced, either in person or digitally. Using the concepts of sender, message, channel, receiver, feedback, noise, and context, which specific components do you think contributed most to the breakdown? How might understanding these elements have helped prevent or resolve the issue?
  2. \n
  3. Consider the three communication models (linear, interactive, and transactional). Can you identify a situation where the linear model (one-way, no feedback) is the most appropriate or common, and another where only the transactional model (simultaneous sending/receiving, shared context) fully captures the dynamic? What makes one model more fitting for each scenario?
  4. \n
  5. The text mentions how a shift in channel (e.g., from texting to a Facetime call) can change the intimacy or intensity of a message. Beyond just intimacy, how might the choice of channel (e.g., email vs. face-to-face, video conference vs. phone call) affect the presence and impact of noise (like semantic noise or psychological noise) in a professional setting?
  6. \n
\n

1.2 Communication Responsibilities: The Roles of Senders and Receivers

\n

Effective communication is a two-way street that requires active participation from both senders and receivers (O’Hair et al., 2023). While the sender is responsible for encoding and delivering a clear message, the receiver plays an equally important role in decoding the message and providing feedback. Each participant has specific responsibilities that contribute to the success of the communication process. This section delves into the roles of senders and receivers, highlighting the importance of clarity, active listening, feedback, and cultural awareness. By understanding and fulfilling these responsibilities, individuals can ensure that their messages are not only sent but also understood and acted upon.

\n

Responsibilities Of the Sender

\n
    \n
  • Using Clarity and Precision: Use clear, concise language appropriate for the receiver and context. For example, a doctor explaining a diagnosis to a patient should avoid medical jargon and use simple terms (Allen et al., 2023). Improving clarity and precision are strategic choices that a sender can make to increase understanding.
  • \n
  • Choosing The Right Channel: Select the most effective medium for the message. A sensitive conversation between a supervisor and employee about performance reviews might be better suited for a face-to-face meeting rather than an email (Wrench et al., 2020). Selecting the channel that is more suitable for the communicative exchange requires the sender to discern how the channel will alter the message. Phone calls, texts, or face-to-face meetings all have situations that they are best suited for as channels.
  • \n
  • Anticipating Noise: Identify potential noise barriers (e.g., distractions, cultural differences) and address them proactively. For instance, a presenter might use a microphone in a noisy room to ensure their message is heard. Being able to empathize with the receiver and understand how noise can distract from meaning is the responsibility of the sender.
  • \n
  • Encouraging Feedback: Actively seek feedback to ensure the message was understood. A manager might ask, “Does that make sense?” or “Do you have any questions?” Asking clarifying questions encourages symmetry of meaning during communicative exchanges and is typically a responsibility of a thoughtful sender.
  • \n
\n

Responsibilities Of the Receiver

\n
    \n
  • Demonstrating Active Listening: Pay full attention to the sender and show engagement through nonverbal cues like nodding or maintaining eye contact (Wrench et al., 2020). Active listening displays regard for the topic and/or the speaker and is often perceived positively. Expending the effort to listen actively is the responsibility of the receiver.
  • \n
  • Providing Feedback and Clarify Misunderstandings: Respond to the sender to confirm understanding or request clarification. For example, a student might say, “I understand the first step, but could you explain the second step again?” Similar to encouraging feedback from the sender’s perspective, providing feedback is the receiver’s opportunity to promote clarity within communication.
  • \n
  • Being Aware of Bias: Recognize personal biases that might affect interpretation. For instance, a receiver with a negative bias toward the sender might misinterpret a neutral message as hostile (Wrench et al., 2020). An example of this is trying to be fair and even-tempered with someone who holds oppositional political beliefs from your own.
  • \n
\n
\n
\n

Example

\n
\n
\n

During a crucial team briefing, Brin, the project manager, demonstrated exemplary sender responsibilities as she introduced the new software implementation. Recognizing the team’s diverse technical backgrounds, she consciously avoided jargon, opting for clear, concise language to explain the system’s benefits, such as simplifying data sharing. Aware of the potential anxieties surrounding workflow changes, she chose a face-to-face meeting, fostering direct interaction and immediate clarification, and ensured a distraction-free environment. Proactively addressing potential noise, she acknowledged their concerns about workload impact and emphasized the long-term advantages. Throughout the briefing, Brin actively solicited feedback, pausing to ask, “Does this make sense?” and “What questions do you have?” and scheduled follow up one-on-one meetings.

\n

On the receiving end, the team members, including John, Maria, and Easton, showcased their receiver responsibilities. They practiced active listening by maintaining eye contact, and minimizing distractions. John sought clarification on the data migration process, while Maria inquired about training, demonstrating their commitment to understanding. Easton, mindful of his past negative experiences with software implementations, consciously mitigated his bias, focusing on Brin’s explanations and the facts presented. The collaborative dynamic between Brin and her team, marked by clear communication and active engagement, resulted in a productive briefing, leaving the team well-informed and positively oriented towards the upcoming software transition.

\n
\n
\n

Wrap Up Questions

\n
    \n
  1. The text highlights the sender’s responsibility in anticipating noise. Beyond external distractions, how can a sender anticipate and proactively address internal forms of noise, such as a receiver’s psychological biases or semantic noise (e.g., jargon) when preparing an important message?
  2. \n
  3. The section emphasizes that active listening is a key responsibility of the receiver. In what ways can a receiver nonverbally demonstrate active listening in a virtual meeting (e.g., via video conference) compared to a face-to-face conversation? What challenges might virtual environments pose for effective active listening?
  4. \n
  5. Both senders and receivers have responsibilities regarding feedback. Describe a scenario where a lack of proper feedback from the receiver led to a significant problem, and then explain how the sender’s responsibility to encourage feedback, combined with the receiver’s responsibility to provide feedback, could have prevented that outcome.
  6. \n
\n

1.3 Identifying Elements That Impact Communication

\n

Communication does not occur in a vacuum; it is influenced by a variety of factors that shape how messages are sent, received, and interpreted (Munz et al., 2024). These factors include the setting in which communication takes place, cultural norms, personal perceptions, emotional states, and environmental conditions (Seiler et al., 2021). For example, a message delivered in a noisy environment may be misunderstood, while cultural differences can lead to misinterpretation of nonverbal cues. This section explores these elements in detail, providing a deeper understanding of how they impact communication. By recognizing and addressing these factors, individuals can adapt their communication strategies to enhance clarity and effectiveness in diverse situations.

\n

Key Factors Influencing Communication

\n
    \n
  • Context: The setting (physical, social, cultural, or historical) shapes how messages are sent and received. For example, a job interview requires formal communication, while a casual chat with friends allows for informal language. Selecting communication that is appropriate for the situation, message, and intended meaning of communication is a key factor influencing how messages are received.
  • \n
  • Culture: Cultural norms influence communication styles, nonverbal cues, and interpretations. In some cultures, direct eye contact is seen as respectful, while in others, it may be considered confrontational (Ting-Toomey & Chung, 2012). Understanding cultural differences and how nonverbal cues change based on culture can empower a communicator to more easily convey their intended message.
  • \n
  • Perception: Personal experiences and biases affect how messages are decoded. A receiver who has had negative experiences with authority figures might interpret a manager’s feedback as criticism. Understanding how your perception affects your view of a situation gives you the ability to approach complicated situations from diverse perspectives.
  • \n
  • Emotions: Emotional states can enhance or hinder communication effectiveness. A person who is angry or stressed might struggle to listen actively or respond calmly. Managing our emotional reactions while communicating can allow us greater ability to respond thoughtfully rather than letting our emotions cause us to say something we don’t mean in a reactive moment.
  • \n
  • Environment: Physical conditions (e.g., noise, lighting) and technological tools impact communication clarity. A poorly lit room or a shaky internet connection can disrupt communication. Anticipating how the environment can influence communication can allow you to have strategies in place to circumvent the shortcomings of environmental disruptions.
  • \n
\n
\n
\n

Example: Cross-Cultural Communication

\n
\n
\n

Scenario: An American businessperson negotiates a deal with a Japanese counterpart.

\n
    \n
  • Cultural Context: The American prefers direct communication, while the Japanese counterpart values indirect communication and harmony (Ting-Toomey & Chung, 2012). These opposing cultural dynamics require both sides to be able to perceive how their differences affect their communication and recognize adaptive strategies that allow compromise to work toward success.
  • \n
  • Perception: The American might interpret the Japanese counterpart’s silence as disinterest, while the Japanese counterpart might view the American’s directness as rude (Wrench et al., 2020). Applying responsibilities described in section 1.2, both sides must be willing to check their perceptions by asking for and encouraging feedback to find commonalities and avoid inaccurate judgments.
  • \n
  • Emotions: Both parties must manage their emotions to maintain a respectful and productive dialogue. By focusing on the messages being sent and not the feelings that those messages provoke, the two sides will be better able to manage their culturally diverse perspectives.
  • \n
\n

By understanding these factors, individuals can adapt their communication strategies to bridge cultural gaps and foster mutual understanding.

\n
\n
\n

Wrap Up Questions

\n
    \n
  1. The section emphasizes how context shapes communication. Describe a specific professional scenario where failing to adapt your communication to the physical or social context (e.g., a casual hallway conversation versus a formal boardroom meeting) could lead to significant negative consequences. What specific communication elements (verbal, nonverbal, channel) would you need to adjust?
  2. \n
  3. Perception and emotions are identified as internal factors influencing communication. Think about a time when your own emotional state or a preconceived perception affected how you received or sent a message. How might active strategies, like those discussed in previous sections (e.g., seeking clarification, being aware of bias), help to mitigate the negative impact of these internal factors?
  4. \n
  5. Beyond cultural differences, how might environmental noise (physical distractions) or technological limitations (a type of environmental impact) disproportionately affect communication for individuals with certain physiological conditions (e.g., hearing impairment, visual impairment)? What responsibilities do senders and receivers have in these situations to ensure effective communication?
  6. \n
\n

1.4 The Impact of Technology on Communication

\n

Technology has revolutionized the way we communicate, offering new opportunities and challenges. Digital tools like email, social media, and video calling have made it easier to connect with others across the globe, but they also introduce complexities such as digital misinterpretation, information overload, and privacy concerns. This section examines how technology has transformed communication, exploring both its benefits and drawbacks. By understanding the impact of technology on communication, individuals can leverage digital tools effectively while mitigating potential challenges, ensuring that their messages are clear, secure, and impactful in an increasingly connected world.

\n

How Technology Transforms Communication and Creates New Challenges

\n
    \n
  • Digital Channels: Email, text messaging, and video calling enable instant, global communication but can lack nonverbal cues. Text-based communication can lead to misinterpretation of tone and intent. For example, a text message might be misinterpreted without tone or facial expressions (Bobkina et al., 2023). Digital communication can be fast and efficient, but it is a lean channel and some of our methods for making shared meanings are lost in translation.
  • \n
  • Social Media: Platforms like Instagram and Facebook facilitate networking and information-sharing but can lead to information overload and privacy concerns. A post might go viral, spreading misinformation rapidly (Dizikes, 2018). Understanding how algorithms and information replication work across social media platforms will enable you to make informed choices about how to use a given social media platform.
  • \n
  • Remote Communication: Tools like Zoom and Teams support remote work and collaboration but can cause digital fatigue and miscommunication. A team member might feel the unintended consequences of technology-related stress and anxiety (Marsh et al., 2022). Constant notifications and messages can overwhelm users, leading to stress and decreased productivity. The constant evolution of workspaces and technology that potentiates working from home also carries with it the transformation of personal and professional decorum within new aspects of our lives.
  • \n
\n

Strategies for Effective Digital Communication

\n
    \n
  • Practicing Digital Etiquette: Use appropriate tone, language, and response times for different platforms. For example, professional emails should maintain a formal tone, while direct messages can be more casual (Baym, 2015). Digital channels and social media platforms have different expectational norms than traditional communication forums.
  • \n
  • Enhancing Media Literacy: Develop the ability to critically assess online content and differentiate between credible sources and misinformation (Lee, 2014). Media literacy provides a methodology to analyze media messages and react appropriately.
  • \n
  • Balancing Online and Offline Communication: Maintain face-to-face interactions to build deeper relationships and reduce digital fatigue (Duradoni, 2024). Recognizing that the social self is constructed both online and offline can give people greater perspective in understanding their social connections.
  • \n
  • Utilizing Security Measures: Protect personal and professional information by using strong passwords, enabling two-factor authentication, and avoiding public Wi-Fi for sensitive transactions (Baym, 2015). By being aware of and responsive to increased security risks in digital communication, informed users can make choices to be preventative and proactive.
  • \n
\n

Wrap Up Questions

\n
    \n
  1. The section notes that digital channels can lack nonverbal cues, leading to misinterpretation. Think about a professional situation where you relied solely on text-based communication (email, text message, chat) and experienced a misunderstanding. How might you have used strategies for effective digital communication (e.g., practicing digital etiquette, balancing online/offline) to prevent that misinterpretation, or what could you do differently next time?
  2. \n
  3. Remote communication tools like Zoom and Teams offer benefits but also introduce challenges like digital fatigue. Considering your own experiences, what specific communication behaviors or practices (from either the sender or receiver’s side, as discussed in previous sections) can help mitigate digital fatigue and miscommunication in virtual professional settings?
  4. \n
  5. The concept of information overload is mentioned in relation to social media. Beyond just social media, how might the constant influx of digital messages across various channels (email, chat, project management tools) impact an individual’s ability to engage in active listening during important conversations or focus on complex tasks? What strategies could help manage this?
  6. \n
\n

Key Takeaways

\n
    \n
  • Communication is a dynamic process influenced by elements like sender, message, channel, receiver, feedback, noise, and context.
  • \n
  • Both senders and receivers have responsibilities to ensure effective communication. Senders must encode clear messages and choose appropriate channels, while receivers must actively listen, decode information, and provide feedback.
  • \n
  • Factors such as context, culture, perception, emotions, and environment shape communication outcomes. Understanding these factors helps individuals adapt their communication strategies.
  • \n
  • Technology has revolutionized communication but introduces challenges like misinterpretation and information overload. Practicing digital etiquette and enhancing media literacy are essential for effective digital communication.
  • \n
\n

Chapter Summary

\n

In this chapter, we explored the fundamental elements of communication, including three models of communication, the responsibilities of senders and receivers, and the factors that influence communication outcomes. We also examined how technology has transformed communication, offering both opportunities and challenges. By understanding these concepts, you can analyze and improve your communication skills, ensuring clarity and effectiveness in every interaction.

\n

Learning Activities

\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n

References

\n

Allen, K. A., Charpentier, V., Hendrickson, M. A., Kessler, M., Gotlieb, R., Marmet, J., Hause, E., Praska, C., Lunos, S., & Pitt, M. B. (2023). Jargon be gone – Patient preference in doctor communication. Journal of Patient Experience, 10. https://doi.org/10.1177/23743735231158942

\n

Baym, N. K. (2015). Personal connections in the digital age. Polity Press.

\n

Bobkina, J., Domínguez Romero, E., & Gómez Ortiz, M. J. (2023). Kinesic communication in traditional and digital contexts: An exploratory study of ESP undergraduate students. System, 115, 103034. https://doi.org/10.1016/j.system.2023.103034

\n

DeVito, J. A. (2018). Human communication: The basic course. Pearson.

\n

Dizikes, P. (2018). Study: On Twitter, false news travels faster than true stories. MIT News Office. https://news.mit.edu/2018/study-twitter-false-news-travels-faster-true-stories-0308

\n

Duradoni, M., Severino, F. P., Bellotti, M., & Guazzini, A. (2024). How mattering and anti-mattering experiences across offline and online environments contribute to people’s digital life balance and social media addiction. Journal of Community and Applied Social Psychology, 34(e70008). https://doi.org/10.1002/casp.70008

\n

Lee, S. H. (2014). Digital literacy education for the development of digital literacy. International Journal of Digital Literacy and Digital Competence, 5(3), 29-43. https://doi.org/10.4018/ijdldc.2014070103

\n

Lucas, S. E., & Stob, P. (2020). The art of public speaking. McGraw-Hill.

\n

Marsh, E., Vallejos, E. P., & Spence, A. (2022). The digital workplace and its dark side: An integrative review. Computers in Human Behavior, 128. https://doi.org/10.1016/j.chb.2021.107118

\n

Munz, S. M., McKenna-Buchanan, T., & Wright, A. M. (Eds.). (2024). The Routledge handbook of public speaking research and theory. Routledge.

\n

O’Hair, D., Rubenstein, H., & Stewart, R. (2023). A pocket guide to public speaking. Macmillan.

\n

Seiler, W., Beall, M., & Mazer, J. (2021). Communication: Making connections. Pearson.

\n

Ting-Toomey, S., & Chung, L. C. (2012). Understanding intercultural communication. Oxford University Press.

\n

Wrench, J. S., Punyanunt-Carter, N. M., & Thweatt, K. S. (2020). Interpersonal communication: A mindful approach to relationships. Milne Open Textbooks. https://open.umn.edu/opentextbooks/textbooks/906

\n

Zarefsky, D., & Engels, J. D. (2021). Public speaking: Strategies for success. Pearson.

\n

Images:

\n

All images on this page:

\n

OpenAI. (2025). ChatGPT. (April 28 version) [Large language model]. https://chatgpt.com/

\n

 

\n

Media Attributions

  • Linear_Communication
  • Screenshot 2025-06-05 205442
  • Screenshot 2025-06-05 212535
", + "protected": false + }, + "author": 53, + "menu_order": 1, + "template": "", + "meta": { + "pb_show_title": "", + "pb_short_title": "", + "pb_subtitle": "", + "pb_authors": [], + "pb_section_license": "" + }, + "chapter-type": [ + 49 + ], + "contributor": [], + "license": [], + "class_list": [ + "post-5", + "chapter", + "type-chapter", + "status-publish", + "hentry", + "chapter-type-numberless" + ], + "part": 3, + "_links": { + "self": [ + { + "href": "https://wtcs.pressbooks.pub/communications/wp-json/pressbooks/v2/chapters/5", + "targetHints": { + "allow": [ + "GET" + ] + } + } + ], + "collection": [ + { + "href": "https://wtcs.pressbooks.pub/communications/wp-json/pressbooks/v2/chapters" + } + ], + "about": [ + { + "href": "https://wtcs.pressbooks.pub/communications/wp-json/wp/v2/types/chapter" + } + ], + "author": [ + { + "embeddable": true, + "href": "https://wtcs.pressbooks.pub/communications/wp-json/wp/v2/users/53" + } + ], + "version-history": [ + { + "count": 48, + "href": "https://wtcs.pressbooks.pub/communications/wp-json/pressbooks/v2/chapters/5/revisions" + } + ], + "predecessor-version": [ + { + "id": 309, + "href": "https://wtcs.pressbooks.pub/communications/wp-json/pressbooks/v2/chapters/5/revisions/309" + } + ], + "part": [ + { + "href": "https://wtcs.pressbooks.pub/communications/wp-json/pressbooks/v2/parts/3" + } + ], + "metadata": [ + { + "href": "https://wtcs.pressbooks.pub/communications/wp-json/pressbooks/v2/chapters/5/metadata/" + } + ], + "wp:attachment": [ + { + "href": "https://wtcs.pressbooks.pub/communications/wp-json/wp/v2/media?parent=5" + } + ], + "wp:term": [ + { + "taxonomy": "chapter-type", + "embeddable": true, + "href": "https://wtcs.pressbooks.pub/communications/wp-json/pressbooks/v2/chapter-type?post=5" + }, + { + "taxonomy": "contributor", + "embeddable": true, + "href": "https://wtcs.pressbooks.pub/communications/wp-json/wp/v2/contributor?post=5" + }, + { + "taxonomy": "license", + "embeddable": true, + "href": "https://wtcs.pressbooks.pub/communications/wp-json/wp/v2/license?post=5" + } + ], + "curies": [ + { + "name": "wp", + "href": "https://api.w.org/{rel}", + "templated": true + } + ] + } + } +] \ No newline at end of file diff --git a/welearn_datastack/plugins/rest_requesters/pressbooks.py b/welearn_datastack/plugins/rest_requesters/pressbooks.py index a3da8ce..716c2fd 100644 --- a/welearn_datastack/plugins/rest_requesters/pressbooks.py +++ b/welearn_datastack/plugins/rest_requesters/pressbooks.py @@ -11,12 +11,7 @@ from welearn_datastack.data.scraped_welearn_document import ScrapedWeLearnDocument from welearn_datastack.plugins.interface import IPluginRESTCollector from welearn_datastack.utils_.http_client_utils import get_new_https_session -from welearn_datastack.utils_.scraping_utils import ( - clean_return_to_line, - clean_text, - clean_text_keep_punctuation, - remove_html_tags, -) +from welearn_datastack.utils_.scraping_utils import clean_text logger = logging.getLogger(__name__) From 86ab77d4165beb201af821c4ed386c6506198ff1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o?= Date: Mon, 23 Jun 2025 15:17:02 +0200 Subject: [PATCH 08/14] Tests methods --- tests/document_collector_hub/plugins_test/test_pressbooks.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/document_collector_hub/plugins_test/test_pressbooks.py b/tests/document_collector_hub/plugins_test/test_pressbooks.py index 179ad4c..8d9dafd 100644 --- a/tests/document_collector_hub/plugins_test/test_pressbooks.py +++ b/tests/document_collector_hub/plugins_test/test_pressbooks.py @@ -1,12 +1,10 @@ import json -import os from pathlib import Path from unittest import TestCase from unittest.mock import Mock, patch import requests -from welearn_datastack.constants import AUTHORIZED_LICENSES from welearn_datastack.data.enumerations import PluginType from welearn_datastack.plugins.rest_requesters.pressbooks import PressBooksCollector From 5bfcd87a18cee9481b6bf0f68615c59c52df1156 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o?= Date: Mon, 23 Jun 2025 15:18:29 +0200 Subject: [PATCH 09/14] add plugin --- welearn_datastack/plugins/rest_requesters/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/welearn_datastack/plugins/rest_requesters/__init__.py b/welearn_datastack/plugins/rest_requesters/__init__.py index afa8afa..dbc2d6c 100644 --- a/welearn_datastack/plugins/rest_requesters/__init__.py +++ b/welearn_datastack/plugins/rest_requesters/__init__.py @@ -4,6 +4,7 @@ from welearn_datastack.plugins.rest_requesters.hal import HALCollector from welearn_datastack.plugins.rest_requesters.oapen import OAPenCollector from welearn_datastack.plugins.rest_requesters.open_alex import OpenAlexCollector +from welearn_datastack.plugins.rest_requesters.pressbooks import PressBooksCollector from welearn_datastack.plugins.rest_requesters.ted import TEDCollector from welearn_datastack.plugins.rest_requesters.wikipedia import WikipediaCollector @@ -13,4 +14,5 @@ TEDCollector, OAPenCollector, OpenAlexCollector, + PressBooksCollector, ] From 895884b0de152f570824376d2e3090ad37a04d11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o?= Date: Mon, 23 Jun 2025 15:35:17 +0200 Subject: [PATCH 10/14] remove useless vibecoded function --- welearn_datastack/utils_/scraping_utils.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/welearn_datastack/utils_/scraping_utils.py b/welearn_datastack/utils_/scraping_utils.py index 3a58eea..5009611 100644 --- a/welearn_datastack/utils_/scraping_utils.py +++ b/welearn_datastack/utils_/scraping_utils.py @@ -61,12 +61,6 @@ def format_cc_license(license: str) -> str: ) -def clean_text_keep_punctuation(text): - text = re.sub(r"\s+", " ", text) - text = re.sub(r'[^a-zA-Z0-9\s.,!?;:\'"\-()]', "", text) - return text.strip() - - def get_url_license_from_dc_format(soup: BeautifulSoup) -> str: """ Extract the license of the document from the DC.rights meta tag. @@ -146,9 +140,7 @@ def clean_text(content: str) -> str: Returns: str: the cleaned content """ - return clean_text_keep_punctuation( - remove_extra_whitespace(remove_html_tags(content)) - ).strip() + return remove_extra_whitespace(remove_html_tags(content)).strip() def get_url_without_hal_like_versionning(url: str) -> str: From ff44e3aebd8654a190d237616458f5493e00eee9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o?= <133012334+lpi-tn@users.noreply.github.com> Date: Mon, 23 Jun 2025 15:36:52 +0200 Subject: [PATCH 11/14] Update welearn_datastack/plugins/rest_requesters/pressbooks.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- welearn_datastack/plugins/rest_requesters/pressbooks.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/welearn_datastack/plugins/rest_requesters/pressbooks.py b/welearn_datastack/plugins/rest_requesters/pressbooks.py index 716c2fd..d83e2ab 100644 --- a/welearn_datastack/plugins/rest_requesters/pressbooks.py +++ b/welearn_datastack/plugins/rest_requesters/pressbooks.py @@ -87,6 +87,8 @@ def run(self, urls: List[str]) -> Tuple[List[ScrapedWeLearnDocument], List[str]] error_docs.append(url) continue metadata_url = item["_links"]["metadata"][0]["href"] + if not metadata_url.endswith("/"): + metadata_url += "/" metadata_resp = client.get(metadata_url) try: metadata_resp.raise_for_status() From 55c86c8acc3bd202451f0e6057cd453849cdb208 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o?= Date: Mon, 23 Jun 2025 15:41:56 +0200 Subject: [PATCH 12/14] apply corrections from copilot --- .../modules/embedding_model_helpers.py | 7 +++++-- .../modules/keywords_extractor.py | 7 ++++++- .../URLCollectors/node_press_books_collect.py | 5 ++--- .../plugins/rest_requesters/pressbooks.py | 18 ++++++------------ 4 files changed, 19 insertions(+), 18 deletions(-) diff --git a/welearn_datastack/modules/embedding_model_helpers.py b/welearn_datastack/modules/embedding_model_helpers.py index b17af49..b7c080a 100644 --- a/welearn_datastack/modules/embedding_model_helpers.py +++ b/welearn_datastack/modules/embedding_model_helpers.py @@ -2,6 +2,7 @@ import math import os import re +from functools import cache from typing import List from uuid import UUID @@ -17,8 +18,9 @@ loaded_models: dict[str, SentenceTransformer] = {} -nlp_model = spacy.load("xx_sent_ud_sm") - +@cache +def _load_spacy_model(): + return spacy.load("xx_sent_ud_sm") def create_content_slices( document: WeLearnDocument, embedding_model_name: str, embedding_model_id: UUID @@ -114,6 +116,7 @@ def _split_by_word_respecting_sent_boundary( logger.info("Splitting document into slices of %d words", slice_length) text = re.sub(" +", " ", re.sub(r"\n+", " ", document_content)).strip() + nlp_model = _load_spacy_model() spacy_doc = nlp_model(text) word_count_slice = 0 diff --git a/welearn_datastack/modules/keywords_extractor.py b/welearn_datastack/modules/keywords_extractor.py index 895f491..a841b1d 100644 --- a/welearn_datastack/modules/keywords_extractor.py +++ b/welearn_datastack/modules/keywords_extractor.py @@ -1,4 +1,5 @@ import logging +from functools import cache from typing import List import spacy @@ -14,7 +15,10 @@ loaded_models: dict[str, SentenceTransformer] = {} -nlp_model = spacy.load("xx_sent_ud_sm") + +@cache +def _load_model(): + return spacy.load("xx_sent_ud_sm") def extract_keywords( @@ -31,6 +35,7 @@ def extract_keywords( embedding_model = load_embedding_model(ml_path.as_posix()) kw_model = KeyBERT(model=embedding_model) + nlp_model = _load_model() doc = nlp_model(str(document.description)) clean_description = " ".join( [token.text for token in [tk for tk in doc if not tk.is_stop]] diff --git a/welearn_datastack/nodes_workflow/URLCollectors/node_press_books_collect.py b/welearn_datastack/nodes_workflow/URLCollectors/node_press_books_collect.py index 4855724..2fb3f75 100644 --- a/welearn_datastack/nodes_workflow/URLCollectors/node_press_books_collect.py +++ b/welearn_datastack/nodes_workflow/URLCollectors/node_press_books_collect.py @@ -1,8 +1,7 @@ import logging import os -from uuid import uuid4 -from welearn_datastack.collectors.press_books_coolector import PressBooksURLCollector +from welearn_datastack.collectors.press_books_collector import PressBooksURLCollector from welearn_datastack.data.db_models import Corpus from welearn_datastack.nodes_workflow.URLCollectors.nodes_helpers.collect import ( insert_urls, @@ -34,7 +33,7 @@ qty_books = 20 corpus: Corpus | None = ( - session.query(Corpus).filter_by(source_name="conversation").one_or_none() + session.query(Corpus).filter_by(source_name="press-books").one_or_none() ) pb_collector = PressBooksURLCollector( diff --git a/welearn_datastack/plugins/rest_requesters/pressbooks.py b/welearn_datastack/plugins/rest_requesters/pressbooks.py index 716c2fd..48c12d4 100644 --- a/welearn_datastack/plugins/rest_requesters/pressbooks.py +++ b/welearn_datastack/plugins/rest_requesters/pressbooks.py @@ -1,6 +1,7 @@ import logging from collections import defaultdict from datetime import datetime +from functools import cache from typing import List, Tuple from urllib.parse import urlparse, urlunparse @@ -17,7 +18,10 @@ CONTAINERS_NAME = ["parts", "chapters", "front-matter", "back-matter"] -nlp_model = spacy.load("xx_sent_ud_sm") + +@cache +def _load_model(): + return spacy.load("xx_sent_ud_sm") # Collector @@ -47,6 +51,7 @@ def _extract_three_first_sentences(text: str) -> str: :param text: The input text from which to extract sentences. :return: A string containing the first three sentences. """ + nlp_model = _load_model() doc = nlp_model(text) sentences = [sent.text for sent in doc.sents] return " ".join(sentences[:3]) if len(sentences) >= 3 else text @@ -184,14 +189,3 @@ def run(self, urls: List[str]) -> Tuple[List[ScrapedWeLearnDocument], List[str]] ) ) return collected_docs, error_docs - - -if __name__ == "__main__": - # Example usage - collector = PressBooksCollector() - urls = [ - "https://wtcs.pressbooks.pub/communications/?p=5", - ] - scraped_docs, error_docs = collector.run(urls) - print(f"Scraped Documents: {len(scraped_docs)}") - print(f"Error Documents: {len(error_docs)}") From 6a826786736715df6dcd00d23cd49fbde5fcaf95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o?= Date: Mon, 23 Jun 2025 15:42:13 +0200 Subject: [PATCH 13/14] lint --- welearn_datastack/modules/embedding_model_helpers.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/welearn_datastack/modules/embedding_model_helpers.py b/welearn_datastack/modules/embedding_model_helpers.py index b7c080a..dc7a32e 100644 --- a/welearn_datastack/modules/embedding_model_helpers.py +++ b/welearn_datastack/modules/embedding_model_helpers.py @@ -18,10 +18,12 @@ loaded_models: dict[str, SentenceTransformer] = {} + @cache def _load_spacy_model(): return spacy.load("xx_sent_ud_sm") + def create_content_slices( document: WeLearnDocument, embedding_model_name: str, embedding_model_id: UUID ) -> List[DocumentSlice]: From 509181b513e0d229802633b34b03f93ea92bea77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o?= Date: Mon, 23 Jun 2025 15:44:52 +0200 Subject: [PATCH 14/14] typo --- welearn_datastack/collectors/press_books_collector.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/welearn_datastack/collectors/press_books_collector.py b/welearn_datastack/collectors/press_books_collector.py index c044b80..f9240ca 100644 --- a/welearn_datastack/collectors/press_books_collector.py +++ b/welearn_datastack/collectors/press_books_collector.py @@ -74,7 +74,7 @@ def collect(self) -> List[WeLearnDocument]: logger.warning("Empty TOC, continue") continue metadata = links.get("metadata") - if not links: + if not metadata: logger.warning("Empty TOC, continue") continue local_urls: list[str] = [i.get("href") for i in metadata]