<jupyter_start><jupyter_text>Table of Contents1&nbsp;&nbsp;Basic File Operations1.1&nbsp;&nbsp;Read the first line from the dataset1.2&nbsp;&nbsp;Reset the pointer of the stream back to the start of the text file1.3&nbsp;&nbsp;Read in the Entire File as a List of Strings1.4&nbsp;&nbsp;Read in the Entire File as One String2&nbsp;&nbsp;Regex2.1&nbsp;&nbsp;Parse Out All Dollar Amount References In the Reviews3&nbsp;&nbsp;Encodings3.1&nbsp;&nbsp;Load in the example_utf8_encoding.csv3.1.1&nbsp;&nbsp;Using a File IO Stream3.1.2&nbsp;&nbsp;Using Pandas Dataframe3.2&nbsp;&nbsp;Load in example_default_mac_encoding.csv3.3&nbsp;&nbsp;Using a File IO Stream3.4&nbsp;&nbsp;Using Pandas DataFrame3.5&nbsp;&nbsp;Explain the Diffference in Output Between latin1 and utf83.6&nbsp;&nbsp;True or False3.6.1&nbsp;&nbsp;ASCII is an encoding scheme.3.6.2&nbsp;&nbsp;Unicode is an encoding scheme.3.6.3&nbsp;&nbsp;UTF-16 can represent twice as many characters as UTF-83.6.4&nbsp;&nbsp;UTF-8 is more memory efficient than UTF-16 / UTF-32.3.6.5&nbsp;&nbsp;The character 🤗 can be represented in latin13.7&nbsp;&nbsp;Unicode Code Points This is a notebook for students who* joined the class after Week 1 and need to make up Week 1 in-class credit* have a valid reason why they were unable to attend Week 1 communicated to the instructor **prior to class** and want to make up credit* students who want additional practice  Basic File OperationsLoad in the `good_amazon_toy_reviews.txt` dataset using `open()`.<jupyter_code>file = open("good_amazon_toy_reviews.txt")<jupyter_output><empty_output><jupyter_text>Read the first line from the dataset  Reset the pointer of the stream back to the start of the text file  Read in the Entire File as a List of Strings  Read in the Entire File as One String  Regex  Parse Out All Dollar Amount References In the ReviewsNote that people will refer to dollar amounts differently. Some people will say "X dollars". Others will use $2.99. First take a look at how people are referring to dollar amounts, and then write a regex that properly finds all references to dollar amounts.  Encodings  Load in the `example_utf8_encoding.csv`  Using a File IO Stream  Using Pandas Dataframe  Load in `example_default_mac_encoding.csv`  Using a File IO Stream<jupyter_code><jupyter_output><empty_output><jupyter_text>Using Pandas DataFrame<jupyter_code><jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.0790794979079498, 'fraction_numerical': 0.02803347280334728, 'mean_word_length': 5.930434782608696, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '229967', 'license': 'MIT', 'n_tokens_mistral': 740, 'n_tokens_neox': 715, 'n_words': 283, 'path': 'week1/Additional Practice (Week 1).ipynb', 'repo_name': 'yixinouyang/dso-560-nlp-and-text-analytics', 'size': '2390'}