> For the complete documentation index, see [llms.txt](https://docs.launchboard.app/cxd/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.launchboard.app/cxd/cxd-cross-disciplinary/projects/cs-for-language-arts-use-machine-learning-to-analyze-writing-1.md).

# CS for Language Arts: Use Machine Learning to Analyze Writing

## **Introduction and Background**

For this project you will use machine learning tools to evaluate the **sentiment** of reviews on an article, story, or movie. You will also use machine learning tools to evaluate a **question and answer** application. These evaluation will give you an experience much like a **natural language processing (NLP) researcher** might do to evaluate the validity of an artificial intelligence product.&#x20;

{% embed url="<https://www.loom.com/share/fbc28339276546958a31ca3faa84de12>" %}

### An Introduction to Natural Language Processing (NLP)

This video gives a quick introduction to NLP and the breadth of applications.&#x20;

{% embed url="<https://youtu.be/CMrHM8a3hqw>" %}

### Recommended Reading

{% embed url="<https://algorithmia.com/blog/introduction-sentiment-analysis>" %}

The article below goes into a lot of depth, but reading up to, and including, the section "What are Word Embeddings?" provides a good introduction.

{% embed url="<https://medium.com/compassred-data-blog/introduction-to-word-embeddings-and-its-applications-8749fd1eb232>" %}

#### **Student Objectives:**

* Prepare text to be processed with natural language processing
* Analyze the text using *sentiment analysis* and/or *sentence encoding* techniques
* Evaluate the results for the potential value and risk it brings

#### **Subject Areas: Computer Science, Language Arts and Social Sciences**

## Instructions

{% embed url="<https://www.loom.com/share/df72e6d4799e45cdb42a112bf129a56d>" %}

### 1. Prepare text to be processed with natural language processing

We want to prepare two pieces of text for this project.

* **A Collection of Reviews on a Work** - This can be simple movie reviews, book reviews, or article reviews. You can collect reviews yourself using a Google form, for example. Your collection doesn't have to be huge. Twenty, or so, reviews collected in a simple document will work great for this project. We will use this to experiment with **sentiment analysis,** to determine if each comment is positive or negative.
* **A Short Body of Text for Automating Questions and Answers** - This can be a short story, company descriptions, or brief article. We will use this text to create an automated question and answer application, where the computer will attempt to answer a user's question based on the source text.

### 2. Analyze the text using *sentiment analysis* and/or *sentence encoding* techniques

{% hint style="warning" %}

#### These online tools will perform best in a Google Chrome browser.

{% endhint %}

* **Sentiment Analysis**\
  Use [**this online tool**](https://sentiment-analysis.jimlyst.repl.co/) to complete a sentiment analysis on your collection of reviews. Once your process the reviews, copy the results of the analysis into a text document for your own records. \ <img src="https://1554394248-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Me5PnfC1YVrQ0BpXcd0%2F-MePRHeTk49p1WbQ2sdf%2F-MePWP61PUa-Lc2m6a-H%2Fimage.png?alt=media&amp;token=df6fd3c0-743a-4a04-8f15-58f02f284bb6" alt="" data-size="original">&#x20;
* **Automated Question and Answer**\
  Use [**this online tool**](https://automatedanswers.jimlyst.repl.co/) to conducted an experiment of automating answers to questions about your chosen body of text. Prepare at least 7 questions about the body of text and record the provided answer for each question. \ <img src="https://1554394248-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Me5PnfC1YVrQ0BpXcd0%2F-MePRHeTk49p1WbQ2sdf%2F-MePXcUBpyr8g8U_IYFw%2Fimage.png?alt=media&amp;token=9f1ed82d-3c7c-4bef-96e2-45bfbcd2c53f" alt="" data-size="original">&#x20;

### 3. Evaluate the results for the potential value and risk it brings

* **Evaluate the Sentiment Analysis**
  * **Performance:** How accurate was the analysis? Did the algorithm do a good job? What seems to give it problems? Write a short summary of your findings.
  * **Applications:** What would be some appropriate applications of this technology? What might be some less appropriate uses for it?
* **Evaluate the Question and Answer Tool**
  * **Performance:** How accurate was the answers? Did the algorithm do a good job? What seems to give it problems? Write a short summary of your findings.
  * **Applications:** What would be some appropriate applications of this technology? What might be some less appropriate uses for it?
* **Prepare a Presentation of Your Project**\
  In addition to the evaluation summaries, include a summary of the source texts you used and samples of the results from the NLP tools.&#x20;


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.launchboard.app/cxd/cxd-cross-disciplinary/projects/cs-for-language-arts-use-machine-learning-to-analyze-writing-1.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
