Skip to content

Conversation

iibrahimli
Copy link

@iibrahimli iibrahimli commented Apr 25, 2021

Update the example to work with the latest spacy as installed by pip install spacy (version 3.0.6), and fix failure to segment sentences due to doc.char_span returning None. Fixes #96.

Add pipe to spacy model
Use the current spacy recommended way to add the pipe to a model.

Fix sentences not split due to extra chars
The doc.char_span uses alignment_mode="strict" by default, which returns None when sent_char_spans contains trailing spaces, for example. Change the alignment_mode to "contract" so that it returns correct spans.

Update the example to work with the latest spacy as installed by `pip install spacy` (version 3.0.6), and fix failure to segment sentences due to `doc.char_span` returning None. The `doc.char_span` uses `alignment_mode="strict"` by default, which returns `None` when `sent_char_spans` contains trailing spaces, for example. Change the `alignment_mode` to `"contract"` so that it returns correct spans.
@iibrahimli iibrahimli changed the title Fix spacy component example Fix spacy component example (issue #96) Apr 25, 2021
@sudarshan85
Copy link

Why is this not merged yet?

@LifeIsStrange
Copy link

@nipunsadvilkar

1 similar comment
@bojanstef
Copy link

@nipunsadvilkar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Spacy integration example is broken

4 participants