INNER CODE UNIT · Python

arg1_pos

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

    def arg1_pos(self, wn_format=False, lemmatize=False):
        """
        Returns the list of (word, pos) pairs associated with
        Arg1. lemmatize=True uses nltk.stem.WordNetStemmer() on the list.
        """
        return self.arg_pos(1, wn_format=wn_format, lemmatize=lemmatize)

    def arg2_pos(self,  wn_format=False, lemmatize=False):
        """
        Returns the list of (word, pos) pairs associated with
        Arg2. lemmatize=True uses nltk.stem.WordNetStemmer() on the list.
        """
        return self.arg_pos(2,  wn_format=wn_format, lemmatize=lemmatize)

    def arg_pos(self, index, wn_format=False, lemmatize=False):
        """
        Returns the list of (word, pos) pairs associated with ArgN,
        where N = index (1 or 2). lemmatize=True uses

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…