-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
9 changed files
with
78 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# -*- coding: utf-8 -*- | ||
import spacy | ||
from gensim.models import Word2Vec | ||
from gensim.test.utils import common_texts | ||
|
||
import concise_concepts # noqa: F401 | ||
|
||
data = {"human": ["trees"], "interface": ["computer"]} | ||
|
||
text = ( | ||
"believe me, it's the slowest mobile I saw. Don't go on screen and Battery, it is" | ||
" an extremely slow mobile phone and takes ages to open and navigate. Forget about" | ||
" heavy use, it can't handle normal regular use. I made a huge mistake but pls" | ||
" don't buy this mobile. It's only a few months and I am thinking to change it. Its" | ||
" dam SLOW SLOW SLOW." | ||
) | ||
|
||
model = Word2Vec( | ||
sentences=common_texts, vector_size=100, window=5, min_count=1, workers=4 | ||
) | ||
model.save("word2vec.model") | ||
model_path = "word2vec.model" | ||
|
||
nlp = spacy.blank("en") | ||
nlp.add_pipe("concise_concepts", config={"data": data, "model_path": model_path}) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "concise-concepts" | ||
version = "0.6.2.1" | ||
version = "0.6.3" | ||
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" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters