NLPPREPROCESS is a preprocessing package for NLP task. The main objective of the package is to reduce time consumed for preprocessing by using ready made functions.
- Python 3.4 or higher
$ pip install nlppreprocess
$ git clone git://github.com/gaganmanku96/nlppreprocess
$ cd nlppreprocess
$ python setup.py install
- Replaces words
- Remove stopwords
- Remove numbers
- Remove HTML tags
- Remove punctations
- Lemmatize words either by Wordnet or Snowball
>>> from nlpuitls import NLP
>>> obj = NLP()
>>> obj = NLP(
replace_words=True,
remove_stopwords=True,
remove_numbers=True,
remove_HTML_tags=True,
remove_punctation=True,
lemmatize=False,
lemmatize_method='wordnet'
)
>>> dataFrame['text'] = dataFrame['text].apply(obj.process)
>>> print(obj.process("Pass a text here"))
>>> obj = NLP()
>>> obj.add_stopword(['this', 'and this'])
>>> obj = NLP()
>>> obj.add_replacement([this="by this", this="by this"])