I am having a hard time figuring out how to remove specific things out of a string file I am working with. My assignment is to remove all numbers, periods, commas, duplicate words, "'s" and change every word to lowercase. I believe I have done everything except the lowercase part. I am getting an error currently with what I have tried to write. Here is the paragraph I have to sort:
GDP is commonly used as an indicator of the economic health of a country, as well as a gauge of a countrys standard of living. Since the mode of measuring GDP is uniform from country to country, GDP can be used to compare the productivity of various countries with a high degree of accuracy. Adjusting for inflation from year to year allows for the seamless comparison of current GDP measurements with measurements from previous years or quarters. In this way, a nations GDP from any period can be measured as a percentage relative to previous years or quarters. When measured in this way, GDP can be tracked over long spans of time and used in measuring a nations economic growth or decline, as well as in determining if an economy is in recession. GDPs popularity as an economic indicator in part stems from its measuring of value added through economic processes. For example, when a ship is built, GDP does not reflect the total value of the completed ship, but rather the difference in values of the completed ship and of the materials used in its construction. Measuring total value instead of value added would greatly reduce GDPs functionality as an indicator of progress or decline, specifically within individual industries and sectors. Proponents of the use of GDP as an economic measure tout its ability to be broken down in this way and thereby serve as an indicator of the failure or success of economic policy as well. For example, from 2004 to 2014 Frances GDP increased by 53.1%, while Japans increased by 6.9% during the same period.
I am not getting an error, but my code I have blocked out in green is what I am trying to fix. If I unblock it, it will give me an error. The error is saying it can't convert a string to an integer.