Last active
May 7, 2018 02:22
-
-
Save AlexDel/058965ecb31972acb60714c4aa960d6f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
file_emotion = open('excitement.txt', 'r', encoding='utf-8') | |
text_emotion = file_emotion.read() | |
words = text_emotion.split() | |
def CountSuperlativeAdj(text): | |
superlativeAdj = [] | |
for word in text: | |
if word[-5:] == 'ейший' or word[-5:] == 'ейшая' or word[-5:] == 'ейшее': | |
superlativeAdj.append(word) | |
elif word[-5:] == 'айший' or word[-5:] == 'айшая' or word[-5:] == 'айшее': | |
superlativeAdj.append(word) | |
elif word == 'самый' or word == 'наиболее' or word == 'наименее': | |
superlativeAdj.append(word) | |
return 'Прилагательных в превосходной степени: {0}'.format(len(superlativeAdj)) | |
print(CountSuperlativeAdj(words)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment