INNER CODE UNIT · Python

arg_attribution_pos

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

    def arg_attribution_pos(self, index, wn_format=False, lemmatize=False):
        """
        Returns the list of (word, pos) pairs associated with ArgN's
        attribution, 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("Arg%s_Attribution" % index, wn_format=wn_format, lemmatize=lemmatize)

    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)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…