<jupyter_start><jupyter_text>Simple example of dependecy parser used for noun phrases detection<jupyter_code>import numpy as np
import pandas as pd
from tqdm.notebook import tqdm
import spacy
from spacy import displacy
nlp = spacy.load("en_core_web_sm")
s = "The restaurant service was very good, but I'm not sure about the food quality"
doc = nlp(s)
components = []
for chunk in doc.noun_chunks:
    components.append({
        'text': chunk.text, 'root': chunk.root.text, 'root_dep': chunk.root.dep_, 
        'root_head': chunk.root.head.text
    })
pd.DataFrame(components)
doc = nlp(s)
displacy.render(doc)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10452418096723869, 'fraction_numerical': 0.0, 'mean_word_length': 4.836363636363636, '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': '280172', 'license': 'MIT', 'n_tokens_mistral': 223, 'n_tokens_neox': 217, 'n_words': 64, 'path': 'absa/dependency.ipynb', 'repo_name': 'ranieri-unimi/notes-ferrara-2022', 'size': '641'}