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
def cut_sentence_new(words): | |
words = (words).decode('utf8') | |
start = 0 | |
i = 0 | |
sents = [] | |
# print words | |
token = list(words[start:i+2]).pop() | |
punt_list = '.!?;~。!?;~'.decode('utf8') | |
for word in words: | |
if word in punt_list and token not in punt_list: |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |