INNER CODE UNIT · Python
arg_pos
ElizaLo/NLP-Natural-Language-Processing · Shallow Discourse Parsing/PDTB_exploration/pdtb.py:241
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
nltk.stem.WordNetStemmer() on the list. wn_format=True merely
converts to WordNet tags where possible, without stemming.
"""
return self.__pos("Arg%s" % index, wn_format=wn_format, lemmatize=lemmatize)
def arg1_attribution_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. wn_format=True merely converts to WordNet tags where
possible, without stemming.
"""
return self.arg_attribution_pos(1, wn_format=wn_format, lemmatize=lemmatize)