From c1724b06d339a06212026aeb487901b78c239646 Mon Sep 17 00:00:00 2001 From: R1j1t <22280243+R1j1t@users.noreply.github.com> Date: Thu, 14 May 2020 21:04:08 +0530 Subject: [PATCH] fixed: vocab.txt missing from package --- MANIFEST.in | 1 + contextualSpellCheck/contextualSpellCheck.py | 2 +- {data => contextualSpellCheck/data}/vocab.txt | 0 {data => extra data}/bigram_norwig.txt | 0 {data => extra data}/spell-errors-testset.txt | 0 setup.py | 3 ++- 6 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 MANIFEST.in rename {data => contextualSpellCheck/data}/vocab.txt (100%) rename {data => extra data}/bigram_norwig.txt (100%) rename {data => extra data}/spell-errors-testset.txt (100%) diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..46699ec --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1 @@ +graft contextualSpellCheck/data* diff --git a/contextualSpellCheck/contextualSpellCheck.py b/contextualSpellCheck/contextualSpellCheck.py index 203d971..a223235 100644 --- a/contextualSpellCheck/contextualSpellCheck.py +++ b/contextualSpellCheck/contextualSpellCheck.py @@ -15,7 +15,7 @@ class ContextualSpellCheck(object): name = "contextual spellchecker" - def __init__(self, vocab_path="../data/vocab.txt", debug=False): + def __init__(self, vocab_path="./data/vocab.txt", debug=False): # self.nlp = spacy.load( # "en_core_web_sm", disable=["tagger", "parser"] # ) # using default tokeniser with NER diff --git a/data/vocab.txt b/contextualSpellCheck/data/vocab.txt similarity index 100% rename from data/vocab.txt rename to contextualSpellCheck/data/vocab.txt diff --git a/data/bigram_norwig.txt b/extra data/bigram_norwig.txt similarity index 100% rename from data/bigram_norwig.txt rename to extra data/bigram_norwig.txt diff --git a/data/spell-errors-testset.txt b/extra data/spell-errors-testset.txt similarity index 100% rename from data/spell-errors-testset.txt rename to extra data/spell-errors-testset.txt diff --git a/setup.py b/setup.py index 5f91bb2..4eb35f2 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="contextualSpellCheck", - version="0.0.1", + version="0.0.3", author="R1j1t", author_email="r1j1t@protonmail.com", description="Contextual spell correction using BERT (bidirectional representations)", @@ -13,6 +13,7 @@ long_description_content_type="text/markdown", url="https://github.com/R1j1t/contextualSpellCheck", packages=setuptools.find_packages(), + include_package_data=True, classifiers=[ "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6",