Skip to content

Commit

Permalink
release 4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
thomwolf committed Apr 8, 2019
1 parent 2027a25 commit cfe0eda
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ Here is the full list of these parameters and their descriptions:
|`max_dist_match` |int |The system will consider linking the current mention to a preceding one further than `max_dist` away if they share a noun or proper noun. In this case, it looks `max_dist_match` away instead. The default value is 500.
|`blacklist` |boolean |Should the system resolve coreferences for pronouns in the following list: `["i", "me", "my", "you", "your"]`. The default value is True (coreference resolved).
|`store_scores` |boolean |Should the system store the scores for the coreferences in annotations. The default value is True.
|`conv_dict` |dict(str, list(str)) |A conversion dictionary that you can use to replace the embeddings of *rare words* (keys) by an average of the embeddings of a list of *common words* (values). Ex: `conv_dict={"Angela": ["woman", "girl"]}` will help resolving coreferences for `Angela` by using the embeddings for the more common `woman` and `girl` instead of the embedding of `Angela`.
|`conv_dict` |dict(str, list(str)) |A conversion dictionary that you can use to replace the embeddings of *rare words* (keys) by an average of the embeddings of a list of *common words* (values). Ex: `conv_dict={"Angela": ["woman", "girl"]}` will help resolving coreferences for `Angela` by using the embeddings for the more common `woman` and `girl` instead of the embedding of `Angela`. This currently only works for single words (not for words groups).
### How to change a parameter
Expand Down Expand Up @@ -236,7 +236,7 @@ nlp.remove_pipe("neuralcoref")
coref = neuralcoref.NeuralCoref(nlp.vocab, conv_dict={'Deepika': ['woman', 'actress']})
nlp.add_pipe(coref, name='neuralcoref')
# or after NeuralCoref is already in SpaCy's pipe, by modifying NeuralCoref in the pipeline
nlp.pipeline[-1][-1].set_conv_dict({'Deepika': ['woman', 'actress']})
nlp.get_pipe('neuralcoref').set_conv_dict({'Deepika': ['woman', 'actress']})
# Let's try agin with the conversion dictionary:
doc = nlp(u'Deepika has a dog. She loves him. The movie star has always been fond of animals')
Expand Down
6 changes: 5 additions & 1 deletion neuralcoref/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@
import tempfile
import logging

# Filter Cython warnings that would force everybody to re-compile from source (like https://github.com/numpy/numpy/pull/432).
import warnings
warnings.filterwarnings("ignore", message="spacy.strings.StringStore size changed,")

from .neuralcoref import NeuralCoref
from .file_utils import NEURALCOREF_MODEL_URL, NEURALCOREF_MODEL_PATH, NEURALCOREF_CACHE, cached_path

__all__ = ['NeuralCoref', 'add_to_pipe']
__version__ = "3.9.0"
__version__ = "4.0.0"

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def setup_package():
extra_link_args=extra_link_args))

setup(name='neuralcoref',
version='3.9',
version='4.0',
description="Coreference Resolution in spaCy with Neural Networks",
url='https://github.com/huggingface/neuralcoref',
author='Thomas Wolf',
Expand Down

0 comments on commit cfe0eda

Please sign in to comment.