Skip to content

Instantly share code, notes, and snippets.

View spallas's full-sized avatar
:octocat:
Focusing

Davide Spallaccini spallas

:octocat:
Focusing
View GitHub Profile

Keybase proof

I hereby claim:

  • I am spallas on github.
  • I am spallas (https://keybase.io/spallas) on keybase.
  • I have a public key whose fingerprint is AC37 ED67 D0B6 A0D7 0A03 12F8 94C0 8F88 143C DD44

To claim this, I am signing this object:

@spallas
spallas / configs.py
Last active November 17, 2020 10:37
Simple and effective configuration management for your project
# ========================= User Instructions ========================= #
#
# 1) Create in your project the following folder:
# common/
# __init__.py
# configs.py
#
# 2) In __init__.py add:
# ```
# from .configs import config
@spallas
spallas / wn_tokenizer.py
Created January 7, 2020 11:59
Apply NLTK treebank tokenizer followed by a Multi-Word Expression tokenizer with multiwords taken from the lemmas in WordNet.
from nltk.corpus import wordnet as wn
from nltk.tokenize import treebank, mwe
class WNTokenizer:
WN_VOCAB = wn.all_lemma_names()
def __init__(self):