INNER CODE UNIT · Python
connective_words
ElizaLo/NLP-Natural-Language-Processing · Shallow Discourse Parsing/PDTB_exploration/pdtb.py:200
def connective_words(self, lemmatize=False):
"""
Returns the list of words associated with an Explicit or
AltLex connective (else it always returns []). lemmatize=True
uses nltk.stem.WordNetStemmer() on the list.
"""
return self.__words(self.connective_pos, lemmatize=lemmatize)
def sup1_words(self, lemmatize=False):
return self.__words(self.sup1_pos, lemmatize=lemmatize)
def sup2_words(self, lemmatize=False):
"""
Returns the list of words associated with Sup1 (if
any). lemmatize=True uses nltk.stem.WordNetStemmer() on the
list.
"""
return self.__words(self.sup2_pos, lemmatize=lemmatize)