Exemple #1
0
 def get_sentences(self):
     words = en_nl.tokenize(self.text).split()
     sentences = []
     current_sentence = []
     for word in words:
         if word in PUNCTUATION:
             if len(current_sentence) >= 1:
                 sentences.append(current_sentence)
                 current_sentence = []
         else:
             current_sentence.append(word)
     sentences.append(current_sentence)
     return sentences
Exemple #2
0
def extract_concepts_with_negation(text):
    words = en_nl.tokenize(text).split()
    return extract_concepts_from_words(words)