Skip to content

Commit

Permalink
small fix to resolve regex max error for ngram words
Browse files Browse the repository at this point in the history
  • Loading branch information
davidberenstein1957 committed Sep 26, 2022
1 parent ed6ad57 commit 0326bec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion concise_concepts/conceptualizer/Conceptualizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,8 @@ def add_patterns(input_dict):
specific_copy[self.match_key] = "{op}".join(word_parts)
else:
specific_copy[self.match_key] = {
"regex": r"(?i)" + "{op}".join(word_parts)
"regex": r"(?i)"
+ re.escape(f"{op}".join(word_parts))
}

patterns.append(
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.6"
version = "0.6.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 <david.m.berenstein@gmail.com>"]
license = "MIT"
Expand Down

0 comments on commit 0326bec

Please sign in to comment.