annotate_generated.py
def compounds_from_doc(doc):
    "Return a list of compounds from the document."
    compounds = []
    current = []
    for token in doc:
        if token.tag_.startswith('NN'):
            current.append(token.orth_)
        elif len(current) == 1:
            current = []
        elif len(current) > 1:
            compounds.append(current)
            current = []
    if len(current) > 1:
        compounds.append(current)
    return compounds
Return a list of compounds from the document.
Return a list of compounds from the document.
Return a list of compounds from the document .
def compounds_from_doc(doc):
    compounds = []
    current = []
    for token in doc:
        if token.tag_.startswith('NN'):
            current.append(token.orth_)
        elif len(current) == 1:
            current = []
        elif len(current) > 1:
            compounds.append(current)
            current = []
    if len(current) > 1:
        compounds.append(current)
    return compounds
def compounds_from_doc ( doc ) : compounds = [ ] current = [ ] for token in doc : if token . tag_ . startswith ( 'NN' ) : current . append ( token . orth_ ) elif len ( current ) == 1 : current = [ ] elif len ( current ) > 1 : compounds . append ( current ) current = [ ] if len ( current ) > 1 : compounds . append ( current ) return compounds
Return a list of compounds from the document.
Return a list of compounds from the document .
"Return a list of compounds from the document."
doc