INNER CODE UNIT · Python

sup2_pos

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

    def sup2_pos(self, wn_format=False, lemmatize=False):
        """
        Returns the list of (word, pos) pairs associated with Sup2 (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(2, wn_format=wn_format, lemmatize=lemmatize)

    def sup_pos(self, index, wn_format=False, lemmatize=False):
        """
        Returns the list of (word, pos) pairs (if any) associated with
        SupN where N = index (1 or 2). lemmatize=True uses
        nltk.stem.WordNetStemmer() on the list. wn_format=True merely
        converts to WordNet tags where possibl, without stemming.
        """
        return self.__pos("Sup%s" % index, wn_format=wn_format, lemmatize=lemmatize)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…