Skip to content

Commit

Permalink
resolved small bug where self.data = self.original_data
Browse files Browse the repository at this point in the history
  • Loading branch information
davidberenstein1957 committed Jan 12, 2023
1 parent 4610fcd commit 991db9f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions concise_concepts/conceptualizer/Conceptualizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ def __init__(
if ent_score:
Span.set_extension("ent_score", default=None)
self.ent_score = ent_score
self.orignal_words = [j for i in data.values() for j in i]
self.original_data = deepcopy(data)
self.data = data
self.name = name
self.nlp = nlp
Expand Down Expand Up @@ -252,15 +250,13 @@ def verify_data(self, verbose: bool = True) -> None:
else:
raise Exception(msg)
self.data = deepcopy(verified_data)
self.original_data = deepcopy(verified_data)

def expand_concepts(self) -> None:
"""
For each key in the data dictionary, find the topn most similar words to the key and the values in the data
dictionary, and add those words to the values in the data dictionary
"""

self.original_data = deepcopy(self.data)

for key in self.data:
present_key = self._check_presence_vocab(key)
if present_key:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "concise-concepts"
version = "0.7.4"
version = "0.7.4.1"
description = "This repository contains an easy and intuitive approach to few-shot NER using most similar expansion over spaCy embeddings. Now with entity confidence scores!"
authors = ["David Berenstein <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit 991db9f

Please sign in to comment.