'''
Created on 18 janv. 2018

@author: olivier.massot
'''
from core.glossary import explain


def analyse(nlp, sentence):
    print("> ", sentence)

    doc = nlp(sentence)

    print(doc.print_tree(light=True))

    for t in doc:
        print("#", t.text)
        print("tag: ", t.tag_)
        print("pos: ", t.pos_, explain(t.pos_))
        print("dep: ", t.dep_, explain(t.dep_))
