Scraping articles from news websites and looking for language patterns in the text. Recognise narrative styles and create profiles for the most popular styles.
Newspapers to Analyse: Analyse newspapers by their political inclination
Neutral = Google News, BBC
Left: The guardian, Daily Mirror, The independent
Right: The Daily Telegraph, Daily Express, Daily Mail
- Python - mysql.connector, re, datetime, os
- MySQL
b.a.a) adjectives frequencies
b.b.a) adverbs frequencies
b.c.a) conjunctions frequencies
b.d.a) interjections frequencies
b.e.a) nouns frequencies
b.f.a) prepositions frequencies
b.g.a) pronouns frequencies
- Create 2 sub-folders in your main folder. The furst folder(today's_articles) is for the articles that we'll analyse. The second folder(archives) is for the articles we have already analysed. Place some .txt files with articles in "today's_articles" for analysis.
- Set MySQL community or corporate server.
- In 'py_to_sql.py' file the following expression - "cursor.execute('USE info_3;')" - is used 3 times. 'info_3' is the MySQL database where the new table will be created and populated with data. Change the name 'info_3' with your database name in all 3 places.
- Use your own password when connecting to the database - /conn = mysql.connector.connect(user = 'root', password = 'your_password', host = 'localhost')/ 3 times
- Run 'function_call.py' file.
We are open to any new tasks that might be interesting to you!