Skip to content

Commit

Permalink
fix: use spacy-download (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
hsheth2 authored Nov 15, 2022
1 parent f253f62 commit e9ab334
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3,391 deletions.
2 changes: 1 addition & 1 deletion datahub-classify/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def get_long_description():
"spacy==3.4.1",
"phonenumbers==8.12.56",
"pandas==1.5.0",
"en_core_web_sm @ https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.4.1/en_core_web_sm-3.4.1.tar.gz",
"spacy-download==1.0.0"
}

dev_requirements = {
Expand Down
5 changes: 2 additions & 3 deletions datahub-classify/src/datahub_classify/infotype_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import numpy as np
import pandas as pd
import phonenumbers
import spacy
from spacy_download import load_spacy

from datahub_classify.constants import (
DATATYPE,
Expand All @@ -24,9 +24,8 @@
match_regex_for_values,
)

# logging.basicConfig(filename='logs.log', encoding='utf-8', level=logging.DEBUG)
logger = logging.getLogger(__name__)
nlp_english = spacy.load("en_core_web_sm")
nlp_english = load_spacy("en_core_web_sm")
spacy_models_list = [nlp_english]


Expand Down
Loading

0 comments on commit e9ab334

Please sign in to comment.