enlp.pipeline.NLPPipeline

class enlp.pipeline.NLPPipeline(model, text)[source]

Pipeline class for combining functions from nlp_tools

Attributes
modelspacy.lang

SpaCy language model

textstr

text string on which to perform processing

poslist

list of Parts-of-Speech tags

tokenslist

list of tokens

Methods

__init__(self, model, text)

__init__ method of nlp_pipeline class

nltk_stem_no(self)

stem text

pos_tag(self)

get part-of-speech tags

rm_punctuation(self, \*\*kwargs)

remove punctuation from text

rm_stopwords(self, \*\*kwargs)

remove stopwords from text

spacy_lemmatize(self)

lemmatise text

tokenise(self)

tokenise text

rm_punctuation(self, **kwargs)[source]

remove punctuation from text

rm_stopwords(self, **kwargs)[source]

remove stopwords from text

Notes

List of stopwords can be obtained from stdtools.get_stopwords()

spacy_lemmatize(self)[source]

lemmatise text

nltk_stem_no(self)[source]

stem text

pos_tag(self)[source]

get part-of-speech tags

tokenise(self)[source]

tokenise text

Examples using enlp.pipeline.NLPPipeline