<jupyter_start><jupyter_text>Coreference resolution using spaCy I. neuralcoref<jupyter_code>%pip install neuralcoref --no-binary neuralcoref
import spacy
import neuralcoref
nlp = spacy.load('en_core_web_sm')
neuralcoref.add_to_pipe(nlp)
doc = nlp('This is a test of the spaCy extension. The test has multiple sentences.')
graphs = doc._.to_amr()
for graph in graphs:
    print(graph)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.09443099273607748, 'fraction_numerical': 0.0, 'mean_word_length': 6.527272727272727, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '651869', 'license': 'CC-BY-4.0', 'n_tokens_mistral': 152, 'n_tokens_neox': 145, 'n_words': 38, 'path': 'tuto/CH08/coref_python_spacy.ipynb', 'repo_name': 'projeduc/ESI_2CS_TALN', 'size': '413'}