Created
August 30, 2019 16:00
-
-
Save Lexie88rus/2be892d1f04aadd14688251298c7e475 to your computer and use it in GitHub Desktop.
Extract words from sentences
This file contains hidden or 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
# Extract words from kernel titles | |
end_of_sentence = '.' # symbol to denote the end of the sentence | |
def extract_words(title): | |
''' | |
Function which transforms kernel title into a list of words ending with 'end_of_sentence' word. | |
''' | |
title = clean_title(title) | |
words = title.split(' ') | |
return words |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment