diff --git a/README.md b/README.md index 072136d..e0f40a8 100644 --- a/README.md +++ b/README.md @@ -201,6 +201,7 @@ - [NLP Tutorial with Python](http://www.datasciencecentral.com/profiles/blogs/python-nlp-tools) ## Sentiment Analysis with Python +- [A Comprehensive Guide to Sentiment Analysis](https://monkeylearn.com/sentiment-analysis/) - [Twitter-Sentiment-Analysis](https://github.com/ujjwalkarn/Twitter-Sentiment-Analysis) - [Basic Sentiment Analysis with Python](http://fjavieralba.com/basic-sentiment-analysis-with-python.html) - [What is the best way to do Sentiment Analysis with Python?](https://www.quora.com/What-is-the-best-way-to-do-Sentiment-Analysis-with-Python-1) diff --git a/Twitter-Data-Analysis/extract_twitter_data.py b/Twitter-Data-Analysis/extract_twitter_data.py index b2558dd..178df35 100644 --- a/Twitter-Data-Analysis/extract_twitter_data.py +++ b/Twitter-Data-Analysis/extract_twitter_data.py @@ -28,7 +28,7 @@ class MyListener(StreamListener): def on_data(self, data): try: - with open('C:\\Users\\ujjwal.karn\\Desktop\\Tweets\\python.json', 'a') as f: #change location here + with open('location/file_name.txt', 'a') as f: #change location here f.write(data) return True except BaseException as e: diff --git a/basic_commands.py b/basic_commands.py index b15d929..8c401fc 100644 --- a/basic_commands.py +++ b/basic_commands.py @@ -1,5 +1,5 @@ >>> a = ['a', 'b', 'c', 'd', 'e'] ->>> for index, item in enumerate(a): print index, item +>>> for index, item in enumerate(a): print index, item # enumerate function will generate an index for the item + item it self. ... 0 a 1 b @@ -37,6 +37,7 @@ str1 = "this is string example....wow!!!"; str2 = "exam"; +# find function will print the position for the first character of the string if it's found! print str1.find(str2); print str1.find(str2, 10); print str1.find(str2, 40);