Skip to content

Instantly share code, notes, and snippets.

@narendramukherjee
narendramukherjee / Multi-dimensional linear regression for palatability.ipynb
Created October 8, 2020 14:17
Linear regression to get population measure of palatability
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@narendramukherjee
narendramukherjee / SnowCastleStemmer.py
Created July 13, 2018 04:31 — forked from wassname/SnowCastleStemmer.py
A wrapper around the nltk snowball stemmer with a reverse lookup table
import nltk
from collections import defaultdict
class SnowCastleStemmer(nltk.stem.SnowballStemmer):
""" A wrapper around snowball stemmer with a reverse lookip table """
def __init__(self, *args, **kwargs):
super(self.__class__, self).__init__(*args, **kwargs)
self._stem_memory = defaultdict(set)
# switch stem and memstem