Skip to content

Commit 991db9f

Browse files
resolved small bug where self.data = self.original_data
1 parent 4610fcd commit 991db9f

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

concise_concepts/conceptualizer/Conceptualizer.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,6 @@ def __init__(
6464
if ent_score:
6565
Span.set_extension("ent_score", default=None)
6666
self.ent_score = ent_score
67-
self.orignal_words = [j for i in data.values() for j in i]
68-
self.original_data = deepcopy(data)
6967
self.data = data
7068
self.name = name
7169
self.nlp = nlp
@@ -252,15 +250,13 @@ def verify_data(self, verbose: bool = True) -> None:
252250
else:
253251
raise Exception(msg)
254252
self.data = deepcopy(verified_data)
253+
self.original_data = deepcopy(verified_data)
255254

256255
def expand_concepts(self) -> None:
257256
"""
258257
For each key in the data dictionary, find the topn most similar words to the key and the values in the data
259258
dictionary, and add those words to the values in the data dictionary
260259
"""
261-
262-
self.original_data = deepcopy(self.data)
263-
264260
for key in self.data:
265261
present_key = self._check_presence_vocab(key)
266262
if present_key:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "concise-concepts"
3-
version = "0.7.4"
3+
version = "0.7.4.1"
44
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!"
55
authors = ["David Berenstein <david.m.berenstein@gmail.com>"]
66
license = "MIT"

0 commit comments

Comments
 (0)