INNER CODE UNIT · Python

connective_pos

ElizaLo/NLP-Natural-Language-Processing · Shallow Discourse Parsing/PDTB_exploration/pdtb.py:277

    def connective_pos(self, wn_format=False, lemmatize=False):
        """
        Returns the list of (word, pos) pairs associated with an
        Explicit or AltLex connective (else returns []).
        lemmatize=True uses nltk.stem.WordNetStemmer() on the
        list. wn_format=True merely converts to WordNet tags where
        possibl, without stemming.
        """
        return self.__pos("Connective", wn_format=wn_format, lemmatize=lemmatize)

    def sup1_pos(self, wn_format=False, lemmatize=False):
        """
        Returns the list of (word, pos) pairs associated with Sup1 (if
        any). lemmatize=True uses nltk.stem.WordNetStemmer() on the
        list. wn_format=True merely converts to WordNet tags where
        possibl, without stemming.
        """
        return self.sup_pos(1, wn_format=wn_format, lemmatize=lemmatize)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…