class documentation

class RSLPStemmer(StemmerI): (source)

View In Hierarchy

A stemmer for Portuguese.

>>> from nltk.stem import RSLPStemmer
>>> st = RSLPStemmer()
>>> # opening lines of Erico Verissimo's "Música ao Longe"
>>> text = '''
... Clarissa risca com giz no quadro-negro a paisagem que os alunos
... devem copiar . Uma casinha de porta e janela , em cima duma
... coxilha .'''
>>> for token in text.split():
...     print(st.stem(token))
clariss risc com giz no quadro-negr a pais que os alun dev copi .
uma cas de port e janel , em cim dum coxilh .
Method __init__ Undocumented
Method apply_rule Undocumented
Method read_rule Undocumented
Method stem Strip affixes from the token and return the stem.
Instance Variable _model Undocumented
def __init__(self): (source)

Undocumented

def apply_rule(self, word, rule_index): (source)

Undocumented

def read_rule(self, filename): (source)

Undocumented

def stem(self, word): (source)

Strip affixes from the token and return the stem.

Parameters
wordUndocumented
token:strThe token that should be stemmed.
_model: list = (source)

Undocumented