Skip to content

Instantly share code, notes, and snippets.

@Lexie88rus
Created August 30, 2019 16:00
Show Gist options
  • Save Lexie88rus/2be892d1f04aadd14688251298c7e475 to your computer and use it in GitHub Desktop.
Save Lexie88rus/2be892d1f04aadd14688251298c7e475 to your computer and use it in GitHub Desktop.
Extract words from sentences
# 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