Welcome to the world of Prosegrammers — where prose meets programming! The term “Prosegrammer” is a delightful combination of “prose” (i.e., the written word) and “programmer” (i.e., the people who write software). As a prosegrammer, you’ll master the art of using Python to create, manipulate, and analyze documents while also learning to craft clear, compelling documentation for your software projects. This course focuses on document engineering, a field that bridges the gap between technical writing and software development. Whether you’re generating reports from data, building interactive documentation systems, or creating tools that transform text, prosegrammers use code to make written communication more powerful and accessible. Join us as we explore how to be both eloquent writers and skilled programmers in the fascinating world of document engineering!
Course Overview
With the goal of cultivating skilled prosegrammers, this web site features a sixteen-week schedule filled with activities that support the development of your professional and technical capacities in the field of document engineering. Although this site is best used by an on-campus learner in the Department of Computer and Information Science at Allegheny College, the resources and projects are all publicly available. This course teaches you to harness Python’s power for creating and manipulating documents, from simple text processing to building sophisticated documentation systems. You’ll learn to use tools like Jupyter Notebooks and Quarto to create interactive documents that blend code, text, and visualizations. Throughout the course, you’ll also develop skills in reading and critiquing documentation for popular open-source projects, ensuring you can both create and consume high-quality technical writing. In addition to learning more about version control, Git, and GitHub, emerging prosegrammers will also learn how to use artificial intelligence (AI) assistants GitHub Copilot, Google Gemini CLI, and OpenCode to create, revise, and extend both documentation and source code. Check out the schedule and slides to begin your journey as a prosegrammer!
Python for Document Engineering
As you explore the technical resources on this site, you’ll discover how Python can transform the way that prosegrammers work with documents. For instance, here’s a simple example of a Python implementation of a word_frequency function that analyzes text to count how often each word appears — a fundamental task in document engineering! This function takes a string of text, converts it to lowercase, removes punctuation, and creates a dictionary showing word frequencies. Pretty neat how Python makes document analysis so accessible! And, notice that the website itself includes the output from running this function with an input!
from typing import Dictimport stringdef word_frequency(text: str) -> Dict[str, int]:"""Analyze text and return a dictionary of word frequencies.""" cleaned_text = text.lower().translate(str.maketrans('', '', string.punctuation)) words = cleaned_text.split() frequency_dict = {}for word in words: frequency_dict[word] = frequency_dict.get(word, 0) +1return frequency_dict# example text about document engineeringsample_text ="Document engineering combines programming with writing. Writing clear documents requires skill. Programming helps automate document creation."# analyze the text and display resultsword_counts = word_frequency(sample_text)print("Word Frequencies:")for word, count insorted(word_counts.items()):print(f"'{word}': {count}")
Building on the previous source code example, let’s explore how prosegrammers can create more sophisticated document analysis tools! The following code demonstrates a document_summary function that provides key insights about any text document. This function calculates statistics like word count, sentence count, and average words per sentence, all of which are essential metrics for document engineers who need to analyze and improve written content. Watch how Python makes complex document analysis tasks straightforward and accessible. And, notice how the website displays the output from running this function with an input!
import refrom typing import Dict, Anydef document_summary(text: str) -> Dict[str, Any]:"""Generate a comprehensive summary of document statistics."""# count words (excluding punctuation-only tokens) words = [word for word in text.split() ifany(char.isalnum() for char in word)] word_count =len(words)# count sentences (simple approach using sentence-ending punctuation) sentences = re.split(r'[.!?]+', text) sentence_count =len([s for s in sentences if s.strip()])# count paragraphs (assuming double newlines separate paragraphs) paragraphs = [p for p in text.split('\n\n') if p.strip()] paragraph_count =len(paragraphs)# calculate averages for words and paragraphs avg_words_per_sentence = word_count / sentence_count if sentence_count >0else0 avg_sentences_per_paragraph = sentence_count / paragraph_count if paragraph_count >0else0return {'word_count': word_count,'sentence_count': sentence_count,'paragraph_count': paragraph_count,'avg_words_per_sentence': round(avg_words_per_sentence, 1),'avg_sentences_per_paragraph': round(avg_sentences_per_paragraph, 1) }# define an example document about prosegrammerssample_document ="""Prosegrammers are skilled professionals who combine programming expertise with writing abilities. They create tools that help generate, analyze, and improve documents.Document engineering is an exciting field that leverages technology to enhance written communication. Python provides excellent libraries for text processing, making it an ideal language for prosegrammers.By mastering both code and prose, prosegrammers can automate repetitive writing tasks, analyze large collections of documents, and create dynamic content that adapts to different audiences."""# analyze the document using the defined summary functionsummary = document_summary(sample_document.strip())print("Document Analysis Summary:")# display the results in a simple formatfor metric, value in summary.items():print(f"{metric.replace('_', ' ').title()}: {value}")
Document Analysis Summary:
Word Count: 74
Sentence Count: 5
Paragraph Count: 3
Avg Words Per Sentence: 14.8
Avg Sentences Per Paragraph: 1.7
Document Engineering Resources
Ready to embark on your journey as a prosegrammer? Start exploring here:
The sixteen-week course schedule provides detailed insights into each step that learners should take to emerge as skilled prosegrammers, including assignments focused on document engineering tools, critiques of documentation sites, and projects that combine programming with writing.
The course syllabus introduces the course and its learning objectives, explaining how on-campus learners will develop both their programming skills and their ability to use tools to create and maintain exceptional documentation.
The course slides offers links to the slides created by both the instructor and the prosegrammers who are learning more about document engineering.
Prosegrammers Community Resources
Interested in connecting with other aspiring prosegrammers? Please join the Prosegrammers Discord Server and join the conversation about document engineering, Python programming, and technical writing! If you are an on-campus learner at Allegheny College, you may also join the Allegheny College Computer Science Discord Server. Finally, if you are an on-campus learner, you can schedule an office hours appointment by visiting the Course Instructor’s Appointment Scheduler.